Add embedded SQLite migrations and migration tests #18

Closed
opened 2026-09-04 23:27:01 +02:00 by arne · 0 comments
Owner

Implement a deterministic migration runner backed by ordered SQL files embedded in the application binary.

Acceptance criteria:

  • Migration SQL is embedded and applied in a deterministic numeric order.
  • Applied versions are recorded in a schema-migrations table and are not re-applied.
  • Each migration is atomic; a failing migration does not leave its partial schema changes marked as applied.
  • Startup runs pending migrations before the application reports ready and surfaces migration failures with version context.
  • Tests cover a fresh database, repeated/idempotent runs, ordering, and rollback/error behavior.
  • Migration tests run with go test ./... and require no external database service.
  • make check passes.

Dependencies:

Implement a deterministic migration runner backed by ordered SQL files embedded in the application binary. Acceptance criteria: - Migration SQL is embedded and applied in a deterministic numeric order. - Applied versions are recorded in a schema-migrations table and are not re-applied. - Each migration is atomic; a failing migration does not leave its partial schema changes marked as applied. - Startup runs pending migrations before the application reports ready and surfaces migration failures with version context. - Tests cover a fresh database, repeated/idempotent runs, ordering, and rollback/error behavior. - Migration tests run with `go test ./...` and require no external database service. - `make check` passes. Dependencies: - Depends on #16 and #17.
arne closed this issue 2026-09-05 08:36:23 +02:00
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
arne/fjomp#18
No description provided.