diff --git a/db/migrate/20161205095623_removing_intermediary_tables.rb b/db/migrate/20161205095623_removing_intermediary_tables.rb index 769b881..18a698e 100644 --- a/db/migrate/20161205095623_removing_intermediary_tables.rb +++ b/db/migrate/20161205095623_removing_intermediary_tables.rb @@ -5,48 +5,52 @@ drop_table :dmptemplates change_table :new_phases do |t| - remove_column :vid + t.remove :vid end drop_table :phases rename_table :new_phases, :phases change_table :new_sections do |t| - rename_column :new_phase_id, :phase_id + t.rename :new_phase_id, :phase_id end drop_table :sections rename_table :new_sections, :sections change_table :new_questions do |t| - rename_column :new_section_id, :section_id - remove_column :question_id + t.rename :new_section_id, :section_id + t.remove :question_id end drop_table :questions rename_table :new_questions, :questions change_table :new_questions_themes do |t| + t.rename :new_question_id, :question_id end drop_table :questions_themes rename_table :new_questions_themes, :questions_themes change_table :new_answers do |t| - rename_column :new_plan_id, :plan_id - rename_column :new_question_id, :question_id + t.rename :new_plan_id, :plan_id + t.rename :new_question_id, :question_id end drop_table :answers rename_table :new_answers, :answers change_table :question_options do |t| - rename_column :new_question_id, :question_id - remove_column :option_id + t.rename :new_question_id, :question_id + t.remove :option_id end drop_table :options + change_table :answers_question_options do |t| + t.rename :new_answer_id, :answer_id + end drop_table :answers_options rename_table :new_answers_question_options, :answers_question_options change_table :notes do |t| - rename_column :new_answer_id, :answer_id + t.rename :new_answer_id, :answer_id end drop_table :comments @@ -56,7 +60,11 @@ rename_table :new_plans, :plans change_table :roles do |t| - rename_column :new_plan_id, :plan_id + t.rename :new_plan_id, :plan_id + end + + change_table :new_suggested_answers do |t| + t.rename :new_question_id, :question_id end end end