From 63e03e25439d71889b88fc29742b5f65c1485c09 Mon Sep 17 00:00:00 2001 From: Kat Date: Thu, 17 Aug 2023 15:02:31 +0100 Subject: [PATCH] Add old form id column --- db/migrate/20230816083950_add_old_form_id_to_sales.rb | 7 +++++++ db/schema.rb | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20230816083950_add_old_form_id_to_sales.rb diff --git a/db/migrate/20230816083950_add_old_form_id_to_sales.rb b/db/migrate/20230816083950_add_old_form_id_to_sales.rb new file mode 100644 index 000000000..f5e02f1ce --- /dev/null +++ b/db/migrate/20230816083950_add_old_form_id_to_sales.rb @@ -0,0 +1,7 @@ +class AddOldFormIdToSales < ActiveRecord::Migration[7.0] + def change + change_table :sales_logs, bulk: true do |t| + t.integer :old_form_id + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 7b5167a24..fe5b6cde4 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_07_19_150610) do +ActiveRecord::Schema[7.0].define(version: 2023_08_16_083950) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -616,6 +616,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_19_150610) do t.datetime "discarded_at" t.integer "stairowned_value_check" t.integer "creation_method", default: 1 + t.integer "old_form_id" t.index ["bulk_upload_id"], name: "index_sales_logs_on_bulk_upload_id" t.index ["created_by_id"], name: "index_sales_logs_on_created_by_id" t.index ["old_id"], name: "index_sales_logs_on_old_id", unique: true