golib/cmd/sql-migrate/examples/pg-todos/sql/migrations/2026-04-05-004000_add-todo-fields.down.sql
AJ ONeal de227bcaaf
feat(sql-migrate/examples): add pg-todos embedded migration runner
Example CLI todo app demonstrating sqlmigrate + pgmigrate for running
migrations directly via pgx/v5 instead of shelling out to psql. Uses
embed.FS for migration files, auto-migrates on startup, and includes
full CRUD for todos and folders with sqlc-ready query files.
2026-04-06 00:40:11 -06:00

8 lines
210 B
SQL

-- add-todo-fields (down)
ALTER TABLE todos DROP COLUMN IF EXISTS priority;
ALTER TABLE todos DROP COLUMN IF EXISTS completed_at;
-- leave this as the last line
DELETE FROM _migrations WHERE id = 'd4e5f6a7';