Commit 1a386d0563a875c1fb431dd4056841fb65eaf43a

Authored by Dmitri Garbuzov
1 parent da778d6c

Removed unused attributes from question and prompt

db/migrate/20100722050746_remove_unused_question_attributes.rb 0 → 100644
@@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
  1 +class RemoveUnusedQuestionAttributes < ActiveRecord::Migration
  2 + def self.up
  3 + remove_column :questions, :active_items_count
  4 + remove_column :questions, :bloom
  5 + remove_column :questions, :first_prompt_algorithm_id
  6 + remove_column :questions, :items_count
  7 + end
  8 +
  9 + def self.down
  10 + add_column :questions, :active_items_count, :integer, :default => 0
  11 + add_column :questions, :bloom, :text
  12 + add_column :questions, :first_prompt_algorithm_id, :integer
  13 + add_column :questions, :items_count, :integer, :default => 0
  14 + end
  15 +end
db/migrate/20100722052215_remove_unused_prompt_attributes.rb 0 → 100644
@@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
  1 +class RemoveUnusedPromptAttributes < ActiveRecord::Migration
  2 + def self.up
  3 + remove_column :prompts, :active
  4 + remove_column :prompts, :algorithm_id
  5 + remove_column :prompts, :randomkey
  6 + remove_column :prompts, :voter_id
  7 + end
  8 +
  9 + def self.down
  10 + add_column :prompts, :active, :boolean
  11 + add_column :prompts, :algorithm_id, :integer
  12 + add_column :prompts, :randomkey, :integer
  13 + add_column :prompts, :voter_id, :integer
  14 + end
  15 +end
@@ -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 => 20100719030739) do 12 +ActiveRecord::Schema.define(:version => 20100722052215) do
13 13
14 create_table "appearances", :force => true do |t| 14 create_table "appearances", :force => true do |t|
15 t.integer "voter_id" 15 t.integer "voter_id"
@@ -127,17 +127,13 @@ ActiveRecord::Schema.define(:version =&gt; 20100719030739) do @@ -127,17 +127,13 @@ ActiveRecord::Schema.define(:version =&gt; 20100719030739) do
127 end 127 end
128 128
129 create_table "prompts", :force => true do |t| 129 create_table "prompts", :force => true do |t|
130 - t.integer "algorithm_id"  
131 t.integer "question_id" 130 t.integer "question_id"
132 t.integer "left_choice_id" 131 t.integer "left_choice_id"
133 t.integer "right_choice_id" 132 t.integer "right_choice_id"
134 - t.integer "voter_id"  
135 - t.boolean "active"  
136 t.datetime "created_at" 133 t.datetime "created_at"
137 t.datetime "updated_at" 134 t.datetime "updated_at"
138 t.text "tracking" 135 t.text "tracking"
139 t.integer "votes_count", :default => 0 136 t.integer "votes_count", :default => 0
140 - t.integer "randomkey"  
141 end 137 end
142 138
143 add_index "prompts", ["left_choice_id", "right_choice_id", "question_id"], :name => "a_cool_index", :unique => true 139 add_index "prompts", ["left_choice_id", "right_choice_id", "question_id"], :name => "a_cool_index", :unique => true
@@ -150,18 +146,14 @@ ActiveRecord::Schema.define(:version =&gt; 20100719030739) do @@ -150,18 +146,14 @@ ActiveRecord::Schema.define(:version =&gt; 20100719030739) do
150 t.string "name", :default => "" 146 t.string "name", :default => ""
151 t.datetime "created_at" 147 t.datetime "created_at"
152 t.datetime "updated_at" 148 t.datetime "updated_at"
153 - t.integer "items_count", :default => 0  
154 - t.integer "active_items_count", :default => 0  
155 t.integer "choices_count", :default => 0 149 t.integer "choices_count", :default => 0
156 t.integer "prompts_count", :default => 0 150 t.integer "prompts_count", :default => 0
157 t.boolean "active", :default => false 151 t.boolean "active", :default => false
158 t.text "tracking" 152 t.text "tracking"
159 - t.integer "first_prompt_algorithm_id"  
160 t.text "information" 153 t.text "information"
161 t.integer "site_id" 154 t.integer "site_id"
162 t.string "local_identifier" 155 t.string "local_identifier"
163 t.integer "votes_count", :default => 0 156 t.integer "votes_count", :default => 0
164 - t.text "bloom"  
165 t.boolean "it_should_autoactivate_ideas", :default => false 157 t.boolean "it_should_autoactivate_ideas", :default => false
166 t.integer "inactive_choices_count", :default => 0 158 t.integer "inactive_choices_count", :default => 0
167 t.boolean "uses_catchup", :default => true 159 t.boolean "uses_catchup", :default => true