From 5538c5dc2c81d98bd9f069d4fd859cd79b8b0756 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 10 Nov 2017 14:08:12 +0100 Subject: Change `compliance_check_set_id` to `bigint` I had missed this one in 63d85933ac99453c76df7cda102a4f60d94f5f53. Thanks a lot to Robert for scouring the fields and finding it. Since the v2 migration was irreversible, add a new one to change the type of this foreign key. Refs #4947 --- db/migrate/20171110130416_change_foreign_keys_to_bigint_3.rb | 5 +++++ db/schema.rb | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20171110130416_change_foreign_keys_to_bigint_3.rb diff --git a/db/migrate/20171110130416_change_foreign_keys_to_bigint_3.rb b/db/migrate/20171110130416_change_foreign_keys_to_bigint_3.rb new file mode 100644 index 000000000..bfe1b4be2 --- /dev/null +++ b/db/migrate/20171110130416_change_foreign_keys_to_bigint_3.rb @@ -0,0 +1,5 @@ +class ChangeForeignKeysToBigint3 < ActiveRecord::Migration + def change + change_column :compliance_check_resources, :compliance_check_set_id, :bigint + end +end diff --git a/db/schema.rb b/db/schema.rb index 1af5ea187..cab058eb7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20171110114408) do +ActiveRecord::Schema.define(version: 20171110130416) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -177,9 +177,9 @@ ActiveRecord::Schema.define(version: 20171110114408) do t.string "type" t.string "reference" t.hstore "metrics" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "compliance_check_set_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.integer "compliance_check_set_id", limit: 8 end add_index "compliance_check_resources", ["compliance_check_set_id"], name: "index_compliance_check_resources_on_compliance_check_set_id", using: :btree -- cgit v1.2.3