Sha256: 3449cc54beacc5a9bfd0d65ec6ba2f31a30736dd85d6e15289625681809bffe0

Contents?: true

Size: 321 Bytes

Versions: 5

Compression:

Stored size: 321 Bytes

Contents

class CreateCities < ActiveRecord::Migration[5.1]
  def change
    create_table :cities do |t|
      t.string :name, limit: 64
      t.string :timezone, limit: 32
      t.belongs_to :country, index: true, null: false, foreign_key: true
    end

    add_index :cities, :name, name: :cities_name, type: :fulltext

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
digital_heroes_startkit-0.1.1.4 lib/generators/project/db/migrate/32_create_cities.rb
digital_heroes_startkit-0.1.1.3 lib/generators/project/db/migrate/32_create_cities.rb
digital_heroes_startkit-0.1.1.2 lib/generators/project/db/migrate/32_create_cities.rb
digital_heroes_startkit-0.1.1.1 lib/generators/project/db/migrate/32_create_cities.rb
digital_heroes_startkit-0.1.1 lib/generators/project/db/migrate/32_create_cities.rb