Skip to content

Create database schema and migration scripts #1

@niden

Description

@niden

Goal

Set up the initial relational schema (or document store collections) for the REST API and generate migration files that can be run locally and in CI/CD.

Tasks

  • Define tables/collections for Users, Roles, Tokens, and any domain entities needed by the first version of the API.
  • Utilize Phinx for migrations and add it as a Composer dependency.
  • Write migration scripts for:
    users table
    roles table (if applicable)
    jwt_blacklist or refresh_tokens table (optional, for revocation)
  • Ensure migrations are idempotent and can be rolled back.
  • Add a migrate shortcut script to composer.json for developers.

Acceptance Criteria

  • Running composer migrate creates the full schema on a fresh DB.
  • All migrations have clear documentation/comments.
  • CI pipeline runs migrations against a test database without errors.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Implemented

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions