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

Version Path
renalware-core-2.1.1 db/migrate/20170926081426_create_countries.rb
renalware-core-2.1.0 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.167 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.166 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.165 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.164 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.163 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.162 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.161 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.160 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.159 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.158 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.157 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.156 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.155 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.153 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.152 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.151 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.149 db/migrate/20170926081426_create_countries.rb
renalware-core-2.0.148 db/migrate/20170926081426_create_countries.rb