Class: CreateProvinces
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateProvinces
- Defined in:
- lib/forge/db/migrate/20130405172033_create_provinces.rb
Instance Method Summary collapse
Instance Method Details
#down ⇒ Object
16 17 18 |
# File 'lib/forge/db/migrate/20130405172033_create_provinces.rb', line 16 def down drop_table :provinces end |
#up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/forge/db/migrate/20130405172033_create_provinces.rb', line 2 def up create_table "provinces" do |t| t.string "title" t.string "code" t.integer "country_id" t.datetime "created_at" t.datetime "updated_at" end add_index "provinces", ["code"], :name => "index_provinces_on_code" add_index "provinces", ["country_id"], :name => "index_provinces_on_country_id" add_index "provinces", ["title"], :name => "index_provinces_on_title" end |