diff --git a/db/migrate/20261012090000_remove_unsubscribed_from_members.rb b/db/migrate/20261012090000_remove_unsubscribed_from_members.rb new file mode 100644 index 000000000..347aec653 --- /dev/null +++ b/db/migrate/20261012090000_remove_unsubscribed_from_members.rb @@ -0,0 +1,5 @@ +class RemoveUnsubscribedFromMembers < ActiveRecord::Migration[8.1] + def change + safety_assured { remove_column :members, :unsubscribed, :boolean } + end +end diff --git a/db/schema.rb b/db/schema.rb index 7410ca203..0aaeadeca 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_09_24_090000) do +ActiveRecord::Schema[8.1].define(version: 2026_10_12_090000) do # These are extensions that must be enabled in order to support this database enable_extension "pg_catalog.plpgsql" @@ -462,7 +462,6 @@ t.boolean "received_coach_welcome_email", default: false t.boolean "received_student_welcome_email", default: false t.string "surname" - t.boolean "unsubscribed" t.datetime "updated_at", precision: nil t.index ["email"], name: "index_members_on_email", unique: true end diff --git a/spec/models/member_spec.rb b/spec/models/member_spec.rb index 6a4d6b64f..b6eac4209 100644 --- a/spec/models/member_spec.rb +++ b/spec/models/member_spec.rb @@ -326,5 +326,9 @@ it 'does not expose the legacy unsubscribed attribute' do expect(described_class.new).not_to respond_to(:unsubscribed) end + + it 'has dropped the legacy unsubscribed column from the database' do + expect(ActiveRecord::Base.connection.column_exists?(:members, :unsubscribed)).to be(false) + end end end