Class: CreateExchanges
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateExchanges
- Defined in:
- lib/generators/economy/install/templates/create_exchanges.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/generators/economy/install/templates/create_exchanges.rb', line 2 def change create_table :exchanges do |t| t.string :service t.string :from t.string :to t.decimal :rate, precision: 24, scale: 12 t. null: false end add_index :exchanges, %i(from to) end |