From 097f01d6a2510ec014ab3267918be79da5ae3bb8 Mon Sep 17 00:00:00 2001 From: Morgan Roderick Date: Tue, 13 Oct 2026 10:39:38 +0200 Subject: [PATCH 1/2] chore(meetings): drop the dead invites_sent column Step 2 of #3017. The meetings.invites_sent boolean has been dead since 39bbbe52 (2020-12-02) removed its last read and write. The absence is pinned in the meeting spec with a column_exists check. Merge only after the ignored_columns change (#3022) has deployed: old releases name the column in their meeting SELECT list, built from the schema cache at boot, and dropping it while they still serve would fail every meeting query during the Heroku preboot switch. --- app/models/meeting.rb | 2 -- .../20261013100000_remove_invites_sent_from_meetings.rb | 5 +++++ db/schema.rb | 3 +-- spec/models/meeting_spec.rb | 4 ++++ 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20261013100000_remove_invites_sent_from_meetings.rb diff --git a/app/models/meeting.rb b/app/models/meeting.rb index eafb163f2..7e758ace4 100644 --- a/app/models/meeting.rb +++ b/app/models/meeting.rb @@ -1,6 +1,4 @@ class Meeting < ApplicationRecord - self.ignored_columns += %w[invites_sent] - include DateTimeConcerns include Listable include Invitable diff --git a/db/migrate/20261013100000_remove_invites_sent_from_meetings.rb b/db/migrate/20261013100000_remove_invites_sent_from_meetings.rb new file mode 100644 index 000000000..df8e8c815 --- /dev/null +++ b/db/migrate/20261013100000_remove_invites_sent_from_meetings.rb @@ -0,0 +1,5 @@ +class RemoveInvitesSentFromMeetings < ActiveRecord::Migration[8.1] + def change + safety_assured { remove_column :meetings, :invites_sent, :boolean, default: false } + end +end diff --git a/db/schema.rb b/db/schema.rb index 0aaeadeca..43a25e672 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.1].define(version: 2026_10_12_090000) do +ActiveRecord::Schema[8.1].define(version: 2026_10_13_100000) do # These are extensions that must be enabled in order to support this database enable_extension "pg_catalog.plpgsql" @@ -410,7 +410,6 @@ t.text "description" t.datetime "ends_at", precision: nil t.boolean "invitable" - t.boolean "invites_sent", default: false t.string "name" t.string "slug" t.integer "spaces" diff --git a/spec/models/meeting_spec.rb b/spec/models/meeting_spec.rb index 9de2794cb..09d6cdc5a 100644 --- a/spec/models/meeting_spec.rb +++ b/spec/models/meeting_spec.rb @@ -86,5 +86,9 @@ it 'does not expose the legacy invites_sent attribute' do expect(described_class.new).not_to respond_to(:invites_sent) end + + it 'has dropped the legacy invites_sent column from the database' do + expect(ActiveRecord::Base.connection.column_exists?(:meetings, :invites_sent)).to be(false) + end end end From 841be84ea3b668788c12b61b240ae8534b042127 Mon Sep 17 00:00:00 2001 From: Morgan Roderick Date: Tue, 13 Oct 2026 11:03:11 +0200 Subject: [PATCH 2/2] chore(meetings): drop the transient legacy-column specs The respond_to and column_exists checks on invites_sent were one-off verifiers for the removal. Once the drop merges they pin nothing that can drift, so they do not stay in the suite. --- spec/models/meeting_spec.rb | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/spec/models/meeting_spec.rb b/spec/models/meeting_spec.rb index 09d6cdc5a..202549865 100644 --- a/spec/models/meeting_spec.rb +++ b/spec/models/meeting_spec.rb @@ -81,14 +81,4 @@ end end end - - describe 'legacy columns' do - it 'does not expose the legacy invites_sent attribute' do - expect(described_class.new).not_to respond_to(:invites_sent) - end - - it 'has dropped the legacy invites_sent column from the database' do - expect(ActiveRecord::Base.connection.column_exists?(:meetings, :invites_sent)).to be(false) - end - end end