From 737dcc81e2c3fa2d8b5aa27025771362d31ec3ea Mon Sep 17 00:00:00 2001 From: Jez Caudle Date: Fri, 27 Jan 2023 12:22:34 +0000 Subject: [PATCH] Not sure what happened here. --- db/migrate/20230127095856_rename_caf_id_to_objective_id.rb | 6 +++++- db/schema.rb | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/db/migrate/20230127095856_rename_caf_id_to_objective_id.rb b/db/migrate/20230127095856_rename_caf_id_to_objective_id.rb index 61188ff..1a88907 100644 --- a/db/migrate/20230127095856_rename_caf_id_to_objective_id.rb +++ b/db/migrate/20230127095856_rename_caf_id_to_objective_id.rb @@ -1,4 +1,8 @@ class RenameCafIdToObjectiveId < ActiveRecord::Migration[7.0] - def change + def change_table + remove_foreign_key :principles, :cafs + remove_index :principles, :caf_id + rename_column :principles, :caf_id, :objective_id + add_foreign_key :principles, :objectives end end diff --git a/db/schema.rb b/db/schema.rb index 5c7fafc..4e7efd3 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_01_27_091956) do +ActiveRecord::Schema[7.0].define(version: 2023_01_27_095856) do create_table "action_text_rich_texts", charset: "utf8mb4", force: :cascade do |t| t.string "name", null: false t.text "body", size: :long