From 33afd180a4519912e3b54a05cdbd4f4d38b7c971 Mon Sep 17 00:00:00 2001 From: Jose Farias Date: Mon, 28 Oct 2024 12:33:09 -0600 Subject: [PATCH] Make event summaries not null We can do this now that the data has been migrated --- db/migrate/20241028183212_make_event_summary_not_null.rb | 5 +++++ db/schema.rb | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20241028183212_make_event_summary_not_null.rb diff --git a/db/migrate/20241028183212_make_event_summary_not_null.rb b/db/migrate/20241028183212_make_event_summary_not_null.rb new file mode 100644 index 000000000..131b92566 --- /dev/null +++ b/db/migrate/20241028183212_make_event_summary_not_null.rb @@ -0,0 +1,5 @@ +class MakeEventSummaryNotNull < ActiveRecord::Migration[8.0] + def change + change_column_null :events, :summary_id, false + end +end diff --git a/db/schema.rb b/db/schema.rb index 1f1a6151f..de1ed4718 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[8.0].define(version: 2024_10_25_224942) do +ActiveRecord::Schema[8.0].define(version: 2024_10_28_183212) do create_table "accesses", force: :cascade do |t| t.integer "bucket_id", null: false t.integer "user_id", null: false @@ -120,7 +120,7 @@ ActiveRecord::Schema[8.0].define(version: 2024_10_25_224942) do t.string "action", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.integer "summary_id" + t.integer "summary_id", null: false t.index ["creator_id"], name: "index_events_on_creator_id" t.index ["summary_id", "action"], name: "index_events_on_summary_id_and_action" end