Scope
One shared helper, two classes of caller:
alembic/env.py issues SET ROLE mavedb_owner after connect. This is the right place rather than a wrapper script, because alembic is invoked by hand from the api container and there is no wrapper to put it in.
- The 8 scripts in
alembic/manual_migrations/ do the same.
Without this, DDL fails with permission denied. Under RLS this means an UPDATE returns 0 rows with no error, so a data migration would silently do nothing.
Acceptance criteria
Scope
One shared helper, two classes of caller:
alembic/env.pyissuesSET ROLE mavedb_ownerafter connect. This is the right place rather than a wrapper script, because alembic is invoked by hand from the api container and there is no wrapper to put it in.alembic/manual_migrations/do the same.Without this, DDL fails with
permission denied. Under RLS this means anUPDATEreturns 0 rows with no error, so a data migration would silently do nothing.Acceptance criteria
env.pyand all 8 manual migration scripts elevate through one shared helper.SET ROLEappears.manual_migrations/READMEdocuments the requirement for future scripts.