Skip to content

Add Alembic database migration scripts for PostgreSQL #20

Description

@Teboho66

Description

When SentinelPay moves from in-memory storage to PostgreSQL, we need
database migration scripts to create the schema. This issue sets up
Alembic and creates the initial migration for the three core tables.

Tasks

  • Install alembic and sqlalchemy
  • Run alembic init migrations at repo root
  • Create SQLAlchemy models for: transactions, fraud_cases,
    audit_records
  • Generate initial migration: alembic revision --autogenerate
  • Verify alembic upgrade head runs without errors against
    a local PostgreSQL instance

Acceptance Criteria

  • alembic upgrade head creates all three tables
  • alembic downgrade -1 rolls back cleanly
  • Migration scripts are committed in migrations/versions/

Good first issue because

Alembic has excellent documentation. This task does not require
understanding the fraud detection logic.

Metadata

Metadata

Assignees

Projects

Status
Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions