Commit 540b22360ce313818c26776ed08830ac38cc176f
Committed by
Rafael Martins
1 parent
04d456df
Exists in
master
and in
29 other branches
Fix migration and add migrations to schema
Showing
2 changed files
with
24 additions
and
7 deletions
Show diff stats
db/migrate/20110729130913_add_region_type_id_to_national_regions.rb
db/schema.rb
... | ... | @@ -325,6 +325,22 @@ ActiveRecord::Schema.define(:version => 20111004184104) do |
325 | 325 | t.datetime "updated_at" |
326 | 326 | end |
327 | 327 | |
328 | + create_table "national_region_types", :force => true do |t| | |
329 | + t.string "name" | |
330 | + end | |
331 | + | |
332 | + create_table "national_regions", :force => true do |t| | |
333 | + t.string "name" | |
334 | + t.string "national_region_code" | |
335 | + t.string "parent_national_region_code" | |
336 | + t.datetime "created_at" | |
337 | + t.datetime "updated_at" | |
338 | + t.integer "national_region_type_id" | |
339 | + end | |
340 | + | |
341 | + add_index "national_regions", ["name"], :name => "name_index" | |
342 | + add_index "national_regions", ["national_region_code"], :name => "code_index" | |
343 | + | |
328 | 344 | create_table "price_details", :force => true do |t| |
329 | 345 | t.decimal "price", :default => 0.0 |
330 | 346 | t.integer "product_id" |
... | ... | @@ -384,7 +400,7 @@ ActiveRecord::Schema.define(:version => 20111004184104) do |
384 | 400 | t.string "type" |
385 | 401 | t.string "identifier" |
386 | 402 | t.integer "environment_id" |
387 | - t.boolean "active", :default => true | |
403 | + t.boolean "active", :default => true | |
388 | 404 | t.string "address" |
389 | 405 | t.string "contact_phone" |
390 | 406 | t.integer "home_page_id" |
... | ... | @@ -395,19 +411,20 @@ ActiveRecord::Schema.define(:version => 20111004184104) do |
395 | 411 | t.float "lat" |
396 | 412 | t.float "lng" |
397 | 413 | t.integer "geocode_precision" |
398 | - t.boolean "enabled", :default => true | |
399 | - t.string "nickname", :limit => 16 | |
414 | + t.boolean "enabled", :default => true | |
415 | + t.string "nickname", :limit => 16 | |
400 | 416 | t.text "custom_header" |
401 | 417 | t.text "custom_footer" |
402 | 418 | t.string "theme" |
403 | - t.boolean "public_profile", :default => true | |
419 | + t.boolean "public_profile", :default => true | |
404 | 420 | t.date "birth_date" |
405 | 421 | t.integer "preferred_domain_id" |
406 | 422 | t.datetime "updated_at" |
407 | - t.boolean "visible", :default => true | |
423 | + t.boolean "visible", :default => true | |
408 | 424 | t.integer "image_id" |
409 | - t.boolean "validated", :default => true | |
425 | + t.boolean "validated", :default => true | |
410 | 426 | t.string "cnpj" |
427 | + t.string "national_region_code" | |
411 | 428 | end |
412 | 429 | |
413 | 430 | add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" | ... | ... |