Problem
The repository contains two independent database migration mechanisms:
prisma/ at the root, used by the TypeScript API service, with prisma:migrate, prisma:push, and a validate:prisma CI step.
indexer/migrations/, a separate migration directory owned by the indexer service.
Both services connect to the same per-network database (*_DATABASE_URL). With two migration systems and no documented ownership, it is unclear which system owns which tables, what order migrations must run in, or how to bring up a fresh database correctly. This risks schema drift and conflicting migrations.
What needs to be done
- Document which tables each system owns and the required order of application.
- Decide and document the target state: a single migration system, or a clear, enforced boundary between the two.
- Provide a single documented command/sequence to bring a fresh database to a working state for both services.
- If consolidating, plan and land the migration path.
Files
prisma/
indexer/migrations/
README.md / docs/
Acceptance deliverables
- Documented ownership of every table and the correct bring-up sequence.
- A fresh database can be initialised for both services with a documented command.
Tests to pass
- A documented fresh-database bring-up succeeds and both services start against it.
npm run validate:prisma continues to pass.
Problem
The repository contains two independent database migration mechanisms:
prisma/at the root, used by the TypeScript API service, withprisma:migrate,prisma:push, and avalidate:prismaCI step.indexer/migrations/, a separate migration directory owned by the indexer service.Both services connect to the same per-network database (
*_DATABASE_URL). With two migration systems and no documented ownership, it is unclear which system owns which tables, what order migrations must run in, or how to bring up a fresh database correctly. This risks schema drift and conflicting migrations.What needs to be done
Files
prisma/indexer/migrations/README.md/docs/Acceptance deliverables
Tests to pass
npm run validate:prismacontinues to pass.