Hi! I tried to upgrade my Discourse v3.2.0 instance to v3.3.0. When it was running the database migrations it failed.
Execute db:migrate
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled: (StandardError)
ERROR: cannot drop column user_id of table invites because other objects depend on it
DETAIL: trigger invites_user_id_readonly on table invites depends on column user_id of table invites
HINT: Use DROP ... CASCADE to drop the dependent objects too.
I fixed this by dropping 3 triggers in the database:
DROP TRIGGER invites_user_id_readonly ON invites;
DROP TRIGGER invites_redeemed_at_readonly ON invites;
DROP TRIGGER user_api_keys_scopes_readonly ON user_api_keys;
My actual question is, can you confirm this is an error on Discourse side? Do you have plans to fix it in the future?
I have PostgreSQL 14.10 running.