Commit 1a386d0563a875c1fb431dd4056841fb65eaf43a
1 parent
da778d6c
Exists in
master
and in
1 other branch
Removed unused attributes from question and prompt
Showing
3 changed files
with
31 additions
and
9 deletions
Show diff stats
db/migrate/20100722050746_remove_unused_question_attributes.rb
0 → 100644
| ... | ... | @@ -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 @@ |
| 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 | ... | ... |
db/schema.rb
| ... | ... | @@ -9,7 +9,7 @@ |
| 9 | 9 | # |
| 10 | 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 | 14 | create_table "appearances", :force => true do |t| |
| 15 | 15 | t.integer "voter_id" |
| ... | ... | @@ -127,17 +127,13 @@ ActiveRecord::Schema.define(:version => 20100719030739) do |
| 127 | 127 | end |
| 128 | 128 | |
| 129 | 129 | create_table "prompts", :force => true do |t| |
| 130 | - t.integer "algorithm_id" | |
| 131 | 130 | t.integer "question_id" |
| 132 | 131 | t.integer "left_choice_id" |
| 133 | 132 | t.integer "right_choice_id" |
| 134 | - t.integer "voter_id" | |
| 135 | - t.boolean "active" | |
| 136 | 133 | t.datetime "created_at" |
| 137 | 134 | t.datetime "updated_at" |
| 138 | 135 | t.text "tracking" |
| 139 | 136 | t.integer "votes_count", :default => 0 |
| 140 | - t.integer "randomkey" | |
| 141 | 137 | end |
| 142 | 138 | |
| 143 | 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 => 20100719030739) do |
| 150 | 146 | t.string "name", :default => "" |
| 151 | 147 | t.datetime "created_at" |
| 152 | 148 | t.datetime "updated_at" |
| 153 | - t.integer "items_count", :default => 0 | |
| 154 | - t.integer "active_items_count", :default => 0 | |
| 155 | 149 | t.integer "choices_count", :default => 0 |
| 156 | 150 | t.integer "prompts_count", :default => 0 |
| 157 | 151 | t.boolean "active", :default => false |
| 158 | 152 | t.text "tracking" |
| 159 | - t.integer "first_prompt_algorithm_id" | |
| 160 | 153 | t.text "information" |
| 161 | 154 | t.integer "site_id" |
| 162 | 155 | t.string "local_identifier" |
| 163 | 156 | t.integer "votes_count", :default => 0 |
| 164 | - t.text "bloom" | |
| 165 | 157 | t.boolean "it_should_autoactivate_ideas", :default => false |
| 166 | 158 | t.integer "inactive_choices_count", :default => 0 |
| 167 | 159 | t.boolean "uses_catchup", :default => true | ... | ... |