From 4284e719d2534775cd630445df94d2f12bc0fbed Mon Sep 17 00:00:00 2001 From: MadeTech Dushan Date: Mon, 13 Dec 2021 12:50:53 +0000 Subject: [PATCH] add fields for deriving startdate --- ...213122642_add_day_month_year_fields_for_start_date.rb | 9 +++++++++ db/schema.rb | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20211213122642_add_day_month_year_fields_for_start_date.rb diff --git a/db/migrate/20211213122642_add_day_month_year_fields_for_start_date.rb b/db/migrate/20211213122642_add_day_month_year_fields_for_start_date.rb new file mode 100644 index 000000000..c0c7c51d9 --- /dev/null +++ b/db/migrate/20211213122642_add_day_month_year_fields_for_start_date.rb @@ -0,0 +1,9 @@ +class AddDayMonthYearFieldsForStartDate < ActiveRecord::Migration[6.1] + def change + change_table :case_logs, bulk: true do |t| + t.column :day, :integer + t.column :month, :integer + t.column :year, :integer + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 38fe84eb0..7f5ba379d 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.define(version: 2021_12_03_144855) do +ActiveRecord::Schema.define(version: 2021_12_13_122642) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -171,6 +171,9 @@ ActiveRecord::Schema.define(version: 2021_12_03_144855) do t.integer "lettype" t.integer "postcode_known" t.integer "la_known" + t.integer "day" + t.integer "month" + t.integer "year" t.index ["discarded_at"], name: "index_case_logs_on_discarded_at" t.index ["managing_organisation_id"], name: "index_case_logs_on_managing_organisation_id" t.index ["owning_organisation_id"], name: "index_case_logs_on_owning_organisation_id"