class AddMissingForeignKeys < ActiveRecord::Migration[4.2] def change add_foreign_key "access_assessments", "users", column: "created_by_id", name: "access_assessments_created_by_id_fk" add_foreign_key "access_assessments", "users", column: "updated_by_id", name: "access_assessments_updated_by_id_fk" add_foreign_key "access_procedures", "users", column: "created_by_id", name: "access_procedures_created_by_id_fk" add_foreign_key "access_procedures", "users", column: "updated_by_id", name: "access_procedures_updated_by_id_fk" add_foreign_key "access_profiles", "users", column: "created_by_id", name: "access_profiles_created_by_id_fk" add_foreign_key "access_profiles", "users", column: "updated_by_id", name: "access_profiles_updated_by_id_fk" add_foreign_key "clinic_visits", "users", column: "created_by_id", name: "clinic_visits_created_by_id_fk" add_foreign_key "clinic_visits", "patients", name: "clinic_visits_patient_id_fk" add_foreign_key "clinic_visits", "users", column: "updated_by_id", name: "clinic_visits_updated_by_id_fk" add_foreign_key "directory_people", "users", column: "created_by_id", name: "directory_people_created_by_id_fk" add_foreign_key "directory_people", "users", column: "updated_by_id", name: "directory_people_updated_by_id_fk" add_foreign_key "events", "users", column: "created_by_id", name: "events_created_by_id_fk" add_foreign_key "events", "users", column: "updated_by_id", name: "events_updated_by_id_fk" add_foreign_key "hd_dry_weights", "users", column: "created_by_id", name: "hd_dry_weights_created_by_id_fk" add_foreign_key "hd_dry_weights", "users", column: "updated_by_id", name: "hd_dry_weights_updated_by_id_fk" add_foreign_key "hd_preference_sets", "users", column: "created_by_id", name: "hd_preference_sets_created_by_id_fk" add_foreign_key "hd_preference_sets", "users", column: "updated_by_id", name: "hd_preference_sets_updated_by_id_fk" add_foreign_key "hd_profiles", "users", column: "created_by_id", name: "hd_profiles_created_by_id_fk" add_foreign_key "hd_profiles", "users", column: "updated_by_id", name: "hd_profiles_updated_by_id_fk" add_foreign_key "hd_sessions", "users", column: "created_by_id", name: "hd_sessions_created_by_id_fk" add_foreign_key "hd_sessions", "users", column: "updated_by_id", name: "hd_sessions_updated_by_id_fk" add_foreign_key "letter_archives", "users", column: "created_by_id", name: "letter_archives_created_by_id_fk" add_foreign_key "letter_archives", "users", column: "updated_by_id", name: "letter_archives_updated_by_id_fk" add_foreign_key "letter_letters", "users", column: "created_by_id", name: "letter_letters_created_by_id_fk" add_foreign_key "letter_letters", "patients", name: "letter_letters_patient_id_fk" add_foreign_key "letter_letters", "users", column: "updated_by_id", name: "letter_letters_updated_by_id_fk" add_foreign_key "pathology_requests_requests", "users", column: "created_by_id", name: "pathology_requests_requests_created_by_id_fk" add_foreign_key "pathology_requests_requests", "users", column: "updated_by_id", name: "pathology_requests_requests_updated_by_id_fk" add_foreign_key "patients", "users", column: "created_by_id", name: "patients_created_by_id_fk" add_foreign_key "patients", "patient_practices", column: "practice_id", name: "patients_practice_id_fk" add_foreign_key "patients", "users", column: "updated_by_id", name: "patients_updated_by_id_fk" add_foreign_key "pd_regimes", "pd_systems", column: "system_id", name: "pd_regimes_system_id_fk" add_foreign_key "problem_notes", "users", column: "created_by_id", name: "problem_notes_created_by_id_fk" add_foreign_key "problem_notes", "users", column: "updated_by_id", name: "problem_notes_updated_by_id_fk" add_foreign_key "transplant_donations", "patients", column: "recipient_id", name: "transplant_donations_recipient_id_fk" add_foreign_key "transplant_registration_statuses", "users", column: "created_by_id", name: "transplant_registration_statuses_created_by_id_fk" add_foreign_key "transplant_registration_statuses", "users", column: "updated_by_id", name: "transplant_registration_statuses_updated_by_id_fk" end end