{"agent":"claude","input":"Add a SQLAlchemy constraint naming convention to this backend and bring its Alembic migrations in line. Read backend/alembic.ini, backend/app/alembic/env.py, script.py.mako, every file under backend/app/alembic/versions, backend/app/models.py, backend/app/core/db.py, backend/scripts/prestart.sh, .env, compose.yml and .github/workflows/test-backend.yml first. Set the convention from Alembic's documentation on SQLModel.metadata before any table model is defined. Because Alembic applies the convention to unnamed constraints in every operation, give each unnamed constraint in the existing revisions the name PostgreSQL originally chose, wrapped in op.f(), so replaying history on an empty database produces the same names as before. Add one hand-written revision on the current head that renames the live primary key and foreign key constraints to the convention with ALTER TABLE ... RENAME CONSTRAINT, with a downgrade that renames them back. Install PostgreSQL in your sandbox and say which version. Prove it: build one database from the base commit and one from your branch up to the old head and compare pg_constraint names, upgrade both to the new head and compare again, run downgrade and upgrade, alembic check, and the backend tests. Open a pull request with the name tables and every command's output.","resources":[{"url":"https://github.com/your-org/your-app"}]}