newdrive/db/migrations/000001_foundation.up.sql
Elijah 077cf7601a
Some checks failed
CI / Backend (push) Failing after 4s
CI / Frontend (push) Successful in 11s
CI / Contracts and repository policy (push) Failing after 5s
CI / Container (push) Has been skipped
Initial phase 1 baseline implementation
2026-07-16 19:14:01 -07:00

10 lines
374 B
SQL

-- Drive v2 uses forward-only migrations. Rollback is restore-or-fix-forward.
CREATE EXTENSION IF NOT EXISTS pg_trgm;
CREATE TABLE IF NOT EXISTS drive_metadata (
singleton BOOLEAN PRIMARY KEY DEFAULT TRUE CHECK (singleton),
installed_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
INSERT INTO drive_metadata (singleton) VALUES (TRUE)
ON CONFLICT (singleton) DO NOTHING;