From 3642afc2f4819d06ca7d1374c620de3c1bfa092f Mon Sep 17 00:00:00 2001 From: Sam Williams Date: Thu, 23 May 2024 06:18:56 -0400 Subject: [PATCH] Fixes local database discrepencies --- app/models/learning_hour.rb | 1 - db/migrate/20240523101303_fix_local_discrepencies.rb | 4 ++++ db/schema.rb | 9 ++++----- 3 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 db/migrate/20240523101303_fix_local_discrepencies.rb diff --git a/app/models/learning_hour.rb b/app/models/learning_hour.rb index a3405354c1..e22242693f 100644 --- a/app/models/learning_hour.rb +++ b/app/models/learning_hour.rb @@ -52,7 +52,6 @@ def user_org_learning_topic_enable? # id :bigint not null, primary key # duration_hours :integer not null # duration_minutes :integer not null -# learning_type :integer default(5) # name :string not null # occurred_at :datetime not null # created_at :datetime not null diff --git a/db/migrate/20240523101303_fix_local_discrepencies.rb b/db/migrate/20240523101303_fix_local_discrepencies.rb new file mode 100644 index 0000000000..931e7d3b72 --- /dev/null +++ b/db/migrate/20240523101303_fix_local_discrepencies.rb @@ -0,0 +1,4 @@ +class FixLocalDiscrepencies < ActiveRecord::Migration[7.1] + def change + end +end diff --git a/db/schema.rb b/db/schema.rb index aa87bfba80..e909844e6b 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.1].define(version: 2024_05_07_022441) do +ActiveRecord::Schema[7.1].define(version: 2024_05_23_101303) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -420,7 +420,6 @@ create_table "learning_hours", force: :cascade do |t| t.bigint "user_id", null: false - t.integer "learning_type", default: 5 t.string "name", null: false t.integer "duration_minutes", null: false t.integer "duration_hours", null: false @@ -692,14 +691,14 @@ add_foreign_key "learning_hour_types", "casa_orgs" add_foreign_key "learning_hours", "learning_hour_types" add_foreign_key "learning_hours", "users" - add_foreign_key "mileage_rates", "casa_orgs" + add_foreign_key "mileage_rates", "casa_orgs", validate: false add_foreign_key "mileage_rates", "users" - add_foreign_key "notes", "users", column: "creator_id" + add_foreign_key "notes", "users", column: "creator_id", validate: false add_foreign_key "other_duties", "users", column: "creator_id" add_foreign_key "patch_notes", "patch_note_groups" add_foreign_key "patch_notes", "patch_note_types" add_foreign_key "placement_types", "casa_orgs" - add_foreign_key "placements", "casa_cases" + add_foreign_key "placements", "casa_cases", validate: false add_foreign_key "placements", "placement_types" add_foreign_key "placements", "users", column: "creator_id" add_foreign_key "preference_sets", "users"