Supabase Branching: preview has a different structure of tables than main
Preview operates on a separate branch of the base and does not see columns added on production.
How to identify the source of the problem
Check the assignment of the preview project to the DB branch and the set of migrations applied.
Compare the result for the authorized and unauthorised user, project name and exact error code.
Repair steps
Apply migration in the prescribed order to the test branch and test its sample data.
How to Test Solution
Preview passes tests on the same model of tables, without overwriting production.
Security and restrictions
Change permissions and scheme first on test data with backup. Do not put service role in your browser.