Commit 017d55625a96d613f0088c172219719dff0ca72f

Authored by Daniela Feitosa
1 parent f8de6d1b

Updated db/schema with new profile fields

(ActionItem2378)
db/migrate/20120710062802_fill_is_template_field_on_basic_templates.rb
1 class FillIsTemplateFieldOnBasicTemplates < ActiveRecord::Migration 1 class FillIsTemplateFieldOnBasicTemplates < ActiveRecord::Migration
2 def self.up 2 def self.up
3 - update("update profiles set is_template = 't' where identifier like '%_template'") 3 + update("update profiles set is_template = (1==1) where identifier like '%_template'")
4 end 4 end
5 5
6 def self.down 6 def self.down
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 # 9 #
10 # It's strongly recommended to check this file into your version control system. 10 # It's strongly recommended to check this file into your version control system.
11 11
12 -ActiveRecord::Schema.define(:version => 20120411132751) do 12 +ActiveRecord::Schema.define(:version => 20120718145131) do
13 13
14 create_table "abuse_reports", :force => true do |t| 14 create_table "abuse_reports", :force => true do |t|
15 t.integer "reporter_id" 15 t.integer "reporter_id"
@@ -425,6 +425,8 @@ ActiveRecord::Schema.define(:version =&gt; 20120411132751) do @@ -425,6 +425,8 @@ ActiveRecord::Schema.define(:version =&gt; 20120411132751) do
425 t.boolean "validated", :default => true 425 t.boolean "validated", :default => true
426 t.string "cnpj" 426 t.string "cnpj"
427 t.string "national_region_code" 427 t.string "national_region_code"
  428 + t.boolean "is_template", :default => false
  429 + t.integer "template_id"
428 end 430 end
429 431
430 add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" 432 add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id"