Skip to content

Epic: Database migrations, seeding, and health checks #126

@ogazboiz

Description

@ogazboiz

Summary

Set up robust database lifecycle management for the FlowFi backend, including Prisma migrations, optional seed data, and health checks that verify database connectivity.

Scope

  • Ensure Prisma datasource is configured for Postgres and matches docker compose connection string.
  • Add npm scripts to run:
    • prisma generate for client generation.
    • prisma migrate dev for local development.
    • prisma migrate deploy for non development environments.
  • Optionally add a seed script that inserts example users and streams.
  • Extend health endpoint to:
    • Execute a lightweight database query.
    • Surface database status in the JSON response.

Acceptance Criteria

  • Migrations run successfully against a fresh Postgres database.
  • Local developers can seed example data with a documented command.
  • Health endpoint returns unhealthy when the database is unreachable.
  • Misconfigured DATABASE_URL leads to clear logs and non zero exit.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend related tasksenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions