Thanks for running those queries @Don - you’ve confirmed the root cause ![]()
Your results show exactly what we suspected
- You have a
backupschema with a copy ofuser_options - That table still has the old default (
column_default = false) - The
backuprow appeared beforepublicin the query results
When the migration dropped the default on public.user_options, it didn’t touch backup.user_options. Then mark_readonly queried information_schema.columns without filtering by schema, got the backup row first (which still had the default), and failed ![]()
The fix is to simply add table_schema = 'public' to the query so it only checks the schema that migrations actually operate on.
https://github.com/discourse/discourse/commit/2623d7a6078a62c33658ddb3b536d08d7a26cd4a