It worked this time - def change, not def change_table
This commit is contained in:
parent
737dcc81e2
commit
44e224393a
@ -1,5 +1,5 @@
|
||||
class RenameCafIdToObjectiveId < ActiveRecord::Migration[7.0]
|
||||
def change_table
|
||||
def change
|
||||
remove_foreign_key :principles, :cafs
|
||||
remove_index :principles, :caf_id
|
||||
rename_column :principles, :caf_id, :objective_id
|
||||
|
||||
6
db/schema.rb
generated
6
db/schema.rb
generated
@ -81,13 +81,13 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_27_095856) do
|
||||
end
|
||||
|
||||
create_table "principles", charset: "utf8mb4", force: :cascade do |t|
|
||||
t.bigint "caf_id", null: false
|
||||
t.bigint "objective_id", null: false
|
||||
t.string "name"
|
||||
t.text "description"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["caf_id"], name: "index_principles_on_caf_id"
|
||||
t.index ["name"], name: "index_principles_on_name"
|
||||
t.index ["objective_id"], name: "fk_rails_7b57179db6"
|
||||
end
|
||||
|
||||
create_table "subprincipleitemgroups", charset: "utf8mb4", force: :cascade do |t|
|
||||
@ -143,7 +143,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_27_095856) do
|
||||
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
|
||||
add_foreign_key "cafs", "companies"
|
||||
add_foreign_key "objectives", "cafs"
|
||||
add_foreign_key "principles", "cafs"
|
||||
add_foreign_key "principles", "objectives"
|
||||
add_foreign_key "subprincipleitemgroups", "subprinciples"
|
||||
add_foreign_key "subprincipleitems", "subprincipleitemgroups"
|
||||
add_foreign_key "subprinciples", "principles"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user