class CreateCountries < ActiveRecord::Migration[8.0]
  def change
    create_table :countries do |t|
      t.string :name
      t.string :code
      t.string :slug
      t.references :region, null: false, foreign_key: true

      t.timestamps
    end
    add_index :countries, :code, unique: true
    add_index :countries, :slug, unique: true
  end
end
