From f6143a57961fb2c275c252f664c6a58838b82c9b Mon Sep 17 00:00:00 2001 From: Kat Date: Thu, 14 Jul 2022 09:02:33 +0100 Subject: [PATCH] Add location startdate column to the db --- db/migrate/20220714080044_add_location_startdate.rb | 7 +++++++ db/schema.rb | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20220714080044_add_location_startdate.rb diff --git a/db/migrate/20220714080044_add_location_startdate.rb b/db/migrate/20220714080044_add_location_startdate.rb new file mode 100644 index 000000000..9389960c5 --- /dev/null +++ b/db/migrate/20220714080044_add_location_startdate.rb @@ -0,0 +1,7 @@ +class AddLocationStartdate < ActiveRecord::Migration[7.0] + def change + change_table :locations, bulk: true do |t| + t.column :startdate, :datetime + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 60780a3eb..5433ddfcc 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_07_13_095713) do +ActiveRecord::Schema[7.0].define(version: 2022_07_14_080044) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -251,6 +251,7 @@ ActiveRecord::Schema[7.0].define(version: 2022_07_13_095713) do t.string "old_id" t.integer "old_visible_id" t.string "mobility_type" + t.datetime "startdate", precision: nil t.index ["old_id"], name: "index_locations_on_old_id", unique: true t.index ["scheme_id"], name: "index_locations_on_scheme_id" end