From d8b14f26a4c41e755557ca6cfca3d2b0aeefe4f1 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Thu, 10 Feb 2022 13:26:09 +0000 Subject: [PATCH] Remove checkbox parent fields --- Gemfile.lock | 14 +++--- ...210132254_remove_checkbox_parent_fields.rb | 15 ++++++ db/schema.rb | 47 +++++++++---------- 3 files changed, 44 insertions(+), 32 deletions(-) create mode 100644 db/migrate/20220210132254_remove_checkbox_parent_fields.rb diff --git a/Gemfile.lock b/Gemfile.lock index 860616d0f..f78dc449b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -340,14 +340,14 @@ GEM nokogiri (~> 1) rubyzip (>= 1.3.0, < 3.0.0) rotp (6.2.0) - rspec-core (3.10.2) - rspec-support (~> 3.10.0) - rspec-expectations (3.10.2) + rspec-core (3.11.0) + rspec-support (~> 3.11.0) + rspec-expectations (3.11.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-mocks (3.10.3) + rspec-support (~> 3.11.0) + rspec-mocks (3.11.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) + rspec-support (~> 3.11.0) rspec-rails (5.1.0) actionpack (>= 5.2) activesupport (>= 5.2) @@ -356,7 +356,7 @@ GEM rspec-expectations (~> 3.10) rspec-mocks (~> 3.10) rspec-support (~> 3.10) - rspec-support (3.10.3) + rspec-support (3.11.0) rubocop (1.25.0) parallel (~> 1.10) parser (>= 3.1.0.0) diff --git a/db/migrate/20220210132254_remove_checkbox_parent_fields.rb b/db/migrate/20220210132254_remove_checkbox_parent_fields.rb new file mode 100644 index 000000000..4a4a7925e --- /dev/null +++ b/db/migrate/20220210132254_remove_checkbox_parent_fields.rb @@ -0,0 +1,15 @@ +class RemoveCheckboxParentFields < ActiveRecord::Migration[7.0] + def up + change_table :case_logs, bulk: true do |t| + t.remove :accessibility_requirements + t.remove :condition_effects + end + end + + def down + change_table :case_logs, bulk: true do |t| + t.column :accessibility_requirements, :string + t.column :condition_effects, :string + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 891c11299..ef946def8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,8 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 202202071123100) do - +ActiveRecord::Schema[7.0].define(version: 202202071123100) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -19,25 +18,25 @@ ActiveRecord::Schema.define(version: 202202071123100) do t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.string "reset_password_token" - t.datetime "reset_password_sent_at" - t.datetime "remember_created_at" - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "reset_password_sent_at", precision: nil + t.datetime "remember_created_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "second_factor_attempts_count", default: 0 t.string "encrypted_otp_secret_key" t.string "encrypted_otp_secret_key_iv" t.string "encrypted_otp_secret_key_salt" t.string "direct_otp" - t.datetime "direct_otp_sent_at" - t.datetime "totp_timestamp" + t.datetime "direct_otp_sent_at", precision: nil + t.datetime "totp_timestamp", precision: nil t.string "phone" t.index ["encrypted_otp_secret_key"], name: "index_admin_users_on_encrypted_otp_secret_key", unique: true end create_table "case_logs", force: :cascade do |t| t.integer "status", default: 0 - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "tenant_code" t.integer "age1" t.string "sex1" @@ -80,8 +79,6 @@ ActiveRecord::Schema.define(version: 202202071123100) do t.integer "reservist" t.integer "illness" t.integer "preg_occ" - t.string "accessibility_requirements" - t.string "condition_effects" t.string "tenancy_code" t.integer "startertenancy" t.integer "tenancylength" @@ -149,19 +146,19 @@ ActiveRecord::Schema.define(version: 202202071123100) do t.string "ppostc1" t.string "ppostc2" t.integer "property_relet" - t.datetime "mrcdate" + t.datetime "mrcdate", precision: nil t.integer "mrcday" t.integer "mrcmonth" t.integer "mrcyear" t.integer "other_hhmemb" t.integer "incref" - t.datetime "sale_completion_date" - t.datetime "startdate" + t.datetime "sale_completion_date", precision: nil + t.datetime "startdate", precision: nil t.integer "armedforces" t.integer "first_time_property_let_as_social_housing" t.integer "unitletas" t.integer "builtype" - t.datetime "property_void_date" + t.datetime "property_void_date", precision: nil t.bigint "owning_organisation_id" t.bigint "managing_organisation_id" t.integer "renttype" @@ -206,8 +203,8 @@ ActiveRecord::Schema.define(version: 202202071123100) do t.boolean "holds_own_stock" t.string "other_stock_owners" t.string "managing_agents" - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "active" t.integer "old_association_type" t.string "software_supplier_id" @@ -231,15 +228,15 @@ ActiveRecord::Schema.define(version: 202202071123100) do t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.string "reset_password_token" - t.datetime "reset_password_sent_at" - t.datetime "remember_created_at" - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "reset_password_sent_at", precision: nil + t.datetime "remember_created_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "name" t.bigint "organisation_id" t.integer "sign_in_count", default: 0, null: false - t.datetime "current_sign_in_at" - t.datetime "last_sign_in_at" + t.datetime "current_sign_in_at", precision: nil + t.datetime "last_sign_in_at", precision: nil t.string "current_sign_in_ip" t.string "last_sign_in_ip" t.integer "role" @@ -256,7 +253,7 @@ ActiveRecord::Schema.define(version: 202202071123100) do t.string "event", null: false t.string "whodunnit" t.text "object" - t.datetime "created_at", precision: 6 + t.datetime "created_at" t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id" end