lab2023/tcmb_currency

View on GitHub
lib/generators/tcmb_currency/migration/templates/migration.rb

Summary

Maintainability
A
0 mins
Test Coverage
class CreateCrossRatesTable < ActiveRecord::Migration[5.0]
  def self.up
    create_table :cross_rates do |t|
      t.string :code
      t.string :name
      t.string :rate
      t.date :date
      t.timestamps
    end
    add_index :cross_rates, :code
  end

  def self.down
    drop_table :cross_rates
  end
end