class CreateCurrencyRates
Public Instance Methods
down()
click to toggle source
# File lib/exchange_rate/db/migrate/20180827184400_create_currency_rates.rb, line 15 def down self << 'DROP TABLE currency_rates' end
up()
click to toggle source
# File lib/exchange_rate/db/migrate/20180827184400_create_currency_rates.rb, line 4 def up create_table(:currency_rates) do |_t| primary_key :id String :currency, null: false BigDecimal :value_in_euro, null: false Date :date_of_rate, null: false index %i[currency date_of_rate], unique: true end end