Skip to content

Internal schema

All tool state lives in a dedicated _smplcty_schema_flow PostgreSQL schema, completely separate from user objects. User-defined objects go into whatever schema you configure via pgSchema (default: public).

File tracking table. Records which schema files have been applied.

ColumnTypeDescription
file_pathtext (PK)Relative path to the schema file
file_hashtextSHA-256 hash of file contents
phasetextpre, schema, or post
applied_attimestamptzWhen the file was last applied

A file is re-run only when its hash changes. There is no one-shot vs. repeatable distinction.

Tracks in-progress expand/contract column migrations.

Stores migration snapshots for rollback. Each snapshot captures the operations that were applied.

  • No collisions — Tool tables never conflict with user-defined objects, even if you have a table named history or snapshots
  • Clean uninstallDROP SCHEMA _smplcty_schema_flow CASCADE removes all tool state without touching user data
  • Clear ownership_smplcty_schema_flow.* is always tool-managed; everything in the user’s schema is their declared state

The schema is created automatically on first run:

CREATE SCHEMA IF NOT EXISTS _smplcty_schema_flow;

This happens in phase 0, before any other operations.