From a416ed92088fe514f6798b08ecee238cb2d834a0 Mon Sep 17 00:00:00 2001 From: Kat Date: Wed, 8 Mar 2023 11:14:30 +0000 Subject: [PATCH] Add local authorities table --- .../20230308101826_create_local_authorities.rb | 13 +++++++++++++ db/schema.rb | 12 +++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20230308101826_create_local_authorities.rb diff --git a/db/migrate/20230308101826_create_local_authorities.rb b/db/migrate/20230308101826_create_local_authorities.rb new file mode 100644 index 000000000..f0531d7d0 --- /dev/null +++ b/db/migrate/20230308101826_create_local_authorities.rb @@ -0,0 +1,13 @@ +class CreateLocalAuthorities < ActiveRecord::Migration[7.0] + def change + create_table :local_authorities do |t| + t.string :code + t.string :la_name + t.datetime :start_date + t.datetime :end_date + t.boolean :previous_location_only, default: false + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index c2f8f8600..f274cd9e8 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_03_01_144555) do +ActiveRecord::Schema[7.0].define(version: 2023_03_08_101826) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -289,6 +289,16 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_01_144555) do t.index ["updated_by_id"], name: "index_lettings_logs_on_updated_by_id" end + create_table "local_authorities", force: :cascade do |t| + t.string "code" + t.string "la_name" + t.datetime "start_date" + t.datetime "end_date" + t.boolean "previous_location_only", default: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "location_deactivation_periods", force: :cascade do |t| t.datetime "deactivation_date" t.datetime "reactivation_date"