From 1afbe82a865bb311734b23a2883f22e3b4a32d93 Mon Sep 17 00:00:00 2001 From: George Eaton Date: Wed, 29 May 2024 11:35:33 +0100 Subject: [PATCH] Remove `RepublishingEvent` `bulk` default value Now that we've updated existing `RepublishingEvent`s with no `bulk` value to set the value to `false`, we'd rather not provide the default option and ensure the value is set explicitly where `RepublishingEvent`s are created. --- ...0529103123_make_republishing_events_bulk_nil_by_default.rb | 3 +++ db/schema.rb | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20240529103123_make_republishing_events_bulk_nil_by_default.rb diff --git a/db/migrate/20240529103123_make_republishing_events_bulk_nil_by_default.rb b/db/migrate/20240529103123_make_republishing_events_bulk_nil_by_default.rb new file mode 100644 index 000000000000..11f8b51c11f2 --- /dev/null +++ b/db/migrate/20240529103123_make_republishing_events_bulk_nil_by_default.rb @@ -0,0 +1,3 @@ +class MakeRepublishingEventsBulkNilByDefault < ActiveRecord::Migration[7.1] + change_column_default(:republishing_events, :bulk, nil) +end diff --git a/db/schema.rb b/db/schema.rb index d6ff428fbdf6..6ad156dff1c1 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_29_093425) do +ActiveRecord::Schema[7.1].define(version: 2024_05_29_103123) do create_table "assets", charset: "utf8mb3", force: :cascade do |t| t.string "asset_manager_id", null: false t.string "variant", null: false @@ -865,7 +865,7 @@ t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "content_id" - t.boolean "bulk", default: false, null: false + t.boolean "bulk", null: false t.integer "bulk_content_type" t.index ["user_id"], name: "index_republishing_events_on_user_id" end