AutoCommit Die Aug 4 22:03:01 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-08-04 22:03:01 +02:00
parent aa06d2195e
commit 9b1c35f499
7 changed files with 57 additions and 18 deletions

View File

@@ -1,9 +1,26 @@
class AddTemplateToSurveyQuestion < ActiveRecord::Migration
def change
add_column :survey_questions, :flag_template, :boolean
add_column :survey_questions, :flag_deleted, :boolean
add_column :survey_questions, :flag_intern,:boolean
def up
add_column :survey_questions, :flag_template, :boolean, :default => 0
add_column :survey_questions, :flag_delete, :boolean, :default => 0
add_column :survey_questions, :flag_intern,:boolean, :default => 0
add_column :survey_questions, :user_id, :integer
add_column :survey_questions, :flag_locked, :boolean
add_column :survey_questions, :flag_locked, :boolean, :default => 0
add_column :survey_questions, :flag_multiplechoice, :boolean, :default => 0
add_column :survey_questions, :sort, :integer
add_column :survey_questions, :flag_hidden, :boolean, :default => 0
add_column :survey_questions, :flag_emailed, :boolean, :default => 0
end
def down
remove_column :survey_questions, :flag_template
remove_column :survey_questions, :flag_delete
remove_column :survey_questions, :flag_intern
remove_column :survey_questions, :user_id
remove_column :survey_questions, :flag_locked
remove_column :survey_questions, :flag_multiplechoice
remove_column :survey_questions, :sort
remove_column :survey_questions, :flag_hidden
remove_column :survey_questions, :flag_emailed
end
end

View File

@@ -0,0 +1,6 @@
class AddFlagsToUsers < ActiveRecord::Migration
def change
add_column :users, :flag_getemails, :boolean, default: 0
add_column :users, :flag_delete, :boolean, default: 0
end
end