Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes migration #280

Merged
merged 1 commit into from
Feb 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions db/migrate/20151012140439_add_request_uuid_to_audits.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ def self.up
if USE_SEPARATE_AUDIT_DATABASE
ActiveRecord::Base.establish_connection("#{Rails.env}")
end

Audited::Adapters::ActiveRecord::Audit.reset_column_information
end

def self.down
Expand Down
3 changes: 2 additions & 1 deletion db/migrate/20151124144200_remove_cofc_column.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class RemoveCofcColumn < ActiveRecord::Migration
def change
Rake::Task["migrate_cofc"].invoke
remove_column :protocols, :has_cofc
end
end
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class AddStudyTypeQuestionGroupIdColumnToStudyTypeQuestions < ActiveRecord::Migration
def up
add_column :study_type_questions, :study_type_question_group_id, :integer
StudyTypeQuestion.reset_column_information
end

def down
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class ChangeSelectedForEpicColumnDefault < ActiveRecord::Migration
def change
change_column :protocols, :selected_for_epic, :boolean, :default => nil
Rake::Task["add_new_study_type_questions"].invoke
end
end
2 changes: 2 additions & 0 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,13 @@
t.string "comment", limit: 255
t.string "remote_address", limit: 255
t.datetime "created_at"
t.string "request_uuid", limit: 255
end

add_index "audits", ["associated_id", "associated_type"], name: "associated_index", using: :btree
add_index "audits", ["auditable_id", "auditable_type"], name: "auditable_index", using: :btree
add_index "audits", ["created_at"], name: "index_audits_on_created_at", using: :btree
add_index "audits", ["request_uuid"], name: "index_audits_on_request_uuid", using: :btree
add_index "audits", ["user_id", "user_type"], name: "user_index", using: :btree

create_table "available_statuses", force: :cascade do |t|
Expand Down