Skip to content

Storage & Portability

Wakeplane is SQLite-first. Postgres support is planned at the storage seam.

All production use runs on SQLite via modernc.org/sqlite (pure Go, no CGO).

AspectStatus
Drivermodernc.org/sqlite (pure Go)
ConnectionSingle writer (SetMaxOpenConns(1))
MigrationsEmbedded via golang-migrate
TimestampsTEXT / RFC3339Nano
BooleansINTEGER 0/1
JSONTEXT
UpsertsINSERT OR REPLACE
  • All application logic (scheduler, dispatcher, executors)
  • Schema structure (table names, columns, relationships)
  • ID generation (UUIDs, deterministic occurrence keys)
  • Cursor-based pagination logic
  • Transaction patterns
ChangeEffort
Driver and Open() signatureLow
INSERT OR REPLACEINSERT ... ON CONFLICT DO UPDATELow
julianday() date arithmetic → INTERVAL expressionsLow
Timestamp column types TEXTTIMESTAMPTZMedium (migration)
Boolean column types INTEGERBOOLEANMedium (migration)
Error detection (string matching → pq error codes)Low

Estimated scope: ~200 lines in store.go plus migration files.

The store implements a typed interface covering:

  • Lifecycle (open, migrate, close)
  • Schedule CRUD and pagination
  • Run CRUD, state transitions, pagination
  • Claim and lease operations
  • Overlap query (concurrent run detection)
  • Metrics and status counts
  • Receipt storage

The interface is designed to accommodate a Postgres dialect without changing application code.

  • Reference: Embedding — using Wakeplane as a Go library
  • docs/storage-interface.md in the source repo
  • docs/sqlite-audit.md in the source repo