diff --git a/config/deploy.rb b/config/deploy.rb index 97a8e5b..2163ec9 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -95,6 +95,10 @@ set :application, 'pic_vert_app' task :migrate do run "cd #{deploy_to}current && bundle exec rake db:migrate RAILS_ENV=#{rails_env}" + end + task :migrate_redo do + run "cd #{deploy_to}current && bundle exec rake db:migrate:redo RAILS_ENV=#{rails_env}" + end task :nginx do diff --git a/db/migrate/20120816091837_create_answer_sets.rb b/db/migrate/20120816091837_create_answer_sets.rb index 439025b..4f4315e 100644 --- a/db/migrate/20120816091837_create_answer_sets.rb +++ b/db/migrate/20120816091837_create_answer_sets.rb @@ -6,6 +6,7 @@ class CreateAnswerSets < ActiveRecord::Migration t.references :survey_item_answer t.text :content t.boolean :is_checked + t.integer :position t.timestamps end add_index :answer_sets, :question_set_id diff --git a/db/migrate/20130717000000_sondage_frapna.rb b/db/migrate/20130717000000_sondage_frapna.rb index 7f3a2d4..7ac2b1c 100644 --- a/db/migrate/20130717000000_sondage_frapna.rb +++ b/db/migrate/20130717000000_sondage_frapna.rb @@ -66,13 +66,13 @@ item.answers.build(:label_text => "Autres > Précisez ", :field_type => 2) @survey.save - add_column :answer_sets, :position, :integer + end def down - remove_column :answer_sets, :position + @survey = SurveyType.find_by_slug("07-13-ressource-en-eau").destroy end end