From 16e792e9d46e949d5ac52545e4d2369508a5fcfd Mon Sep 17 00:00:00 2001 From: Kat Date: Fri, 2 Dec 2022 10:06:40 +0000 Subject: [PATCH] Add previous ownership to the db --- .../20221202100512_add_previous_ownership_to_sales.rb | 7 +++++++ db/schema.rb | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20221202100512_add_previous_ownership_to_sales.rb diff --git a/db/migrate/20221202100512_add_previous_ownership_to_sales.rb b/db/migrate/20221202100512_add_previous_ownership_to_sales.rb new file mode 100644 index 000000000..2953b5333 --- /dev/null +++ b/db/migrate/20221202100512_add_previous_ownership_to_sales.rb @@ -0,0 +1,7 @@ +class AddPreviousOwnershipToSales < ActiveRecord::Migration[7.0] + def change + change_table :sales_logs, bulk: true do |t| + t.column :prevown, :int + end + end +end diff --git a/db/schema.rb b/db/schema.rb index a49ca6568..912eba818 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: 2022_12_02_083418) do +ActiveRecord::Schema[7.0].define(version: 2022_12_02_100512) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -389,6 +389,7 @@ ActiveRecord::Schema[7.0].define(version: 2022_12_02_083418) do t.integer "income2nk" t.integer "savingsnk" t.integer "savings" + t.integer "prevown" t.index ["created_by_id"], name: "index_sales_logs_on_created_by_id" t.index ["managing_organisation_id"], name: "index_sales_logs_on_managing_organisation_id" t.index ["owning_organisation_id"], name: "index_sales_logs_on_owning_organisation_id"