Unable to run rspec tests for plugins

I’m developing against stable and I just found I am no longer able to execute backend tests. Not just my own tests, but also those of standard plugins. They all error out with the same reason.

$ bin/rspec plugins/discourse-subscriptions/
Detected plugin spec path, setting LOAD_PLUGINS to 1

An error occurred while loading rails_helper.
Failure/Error: SeedFu.seed

RuntimeError:
  Undeclared attribute type for enum 'chat_email_frequency' in UserOption. Enums must be backed by a database column or declared with an explicit type via `attribute`.
# ./spec/rails_helper.rb:139:in `<top (required)>'
No examples found.


Finished in 0.00004 seconds (files took 3.45 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

It has been a while since I ran the tests local as I was busy with frontend stuff for my new plugin. So I didn’t notice when it broke. I don’t have the problem when I run an arbitrary test of discourse.

So according to the error the test database is missing a column. Upon inspect it is indeed missing. I have already executed RAILS_ENV=test bin/rails db:migrate:reset to rebuild the test database but it ends in the same result.

It looks like some migrations for the chat plugin are not included. But I cannot figure out why.

The development database does have these columns.