Skip to content

Clarify ownership between the Prisma schema and the indexer migrations #19

Description

@priscaenoch

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.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions