Sha256: 843473f500b39b5431d07ef0731177a657e86626dfd991f85c2a02d30a0dd408

Contents?: true

Size: 583 Bytes

Versions: 38

Compression:

Stored size: 583 Bytes

Contents

class CreatePlaces < ActiveRecord::Migration
  def change
    create_table :places, options: 'DEFAULT CHARSET=utf8' do |t|
      t.string :name, null: false
      t.string :city
      t.string :state_or_province
      t.string :country, null: false, default: "US"
      t.string :type, null: false
      t.text :description

      t.timestamps
    end
    add_index :places, :name
    add_index :places, :city
    add_index :places, :state_or_province
    add_index :places, :country
    add_index :places, :type
    add_index :places, [:name, :state_or_province, :country]
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
reso-0.1.6.7 lib/generators/reso/templates/create_places.rb
reso-0.1.6.6 lib/generators/reso/templates/create_places.rb
reso-0.1.6.5 lib/generators/reso/templates/create_places.rb
reso-0.1.6.4 lib/generators/reso/templates/create_places.rb
reso-0.1.6.3 lib/generators/reso/templates/create_places.rb
reso-0.1.6.2 lib/generators/reso/templates/create_places.rb
reso-0.1.6.1 lib/generators/reso/templates/create_places.rb
reso-0.1.6 lib/generators/reso/templates/create_places.rb
reso-0.1.5.11 lib/generators/reso/templates/create_places.rb
reso-0.1.5.10 lib/generators/reso/templates/create_places.rb
reso-0.1.5.9 lib/generators/reso/templates/create_places.rb
reso-0.1.5.7 lib/generators/reso/templates/create_places.rb
reso-0.1.5.6 lib/generators/reso/templates/create_places.rb
reso-0.1.5.5 lib/generators/reso/templates/create_places.rb
reso-0.1.5.4 lib/generators/reso/templates/create_places.rb
reso-0.1.5.3 lib/generators/reso/templates/create_places.rb
reso-0.1.5.2 lib/generators/reso/templates/create_places.rb
reso-0.1.5.1 lib/generators/reso/templates/create_places.rb
reso-0.1.5.0 lib/generators/reso/templates/create_places.rb
reso-0.1.4.10 lib/generators/reso/templates/create_places.rb