Sha256: b767e0b723581606234d8e3eb26df67d2fa9ba976af374ca1804c3614fff0f7c
Contents?: true
Size: 502 Bytes
Versions: 172
Compression:
Stored size: 502 Bytes
Contents
class CreateCountries < ActiveRecord::Migration[5.1] def change create_table :system_countries do |t| t.string :name, null: false, index: :unique t.string :alpha2, null: false, index: :unique t.string :alpha3, null: false, index: :unique t.integer :position, index: :true end remove_column :addresses, :country, :string add_column :addresses, :country_id, :integer, index: true add_foreign_key :addresses, :system_countries, column: :country_id end end
Version data entries
172 entries across 172 versions & 1 rubygems