mirror of
https://github.com/therootcompany/golib.git
synced 2026-11-04 06:55:00 +00:00
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.
8 lines
189 B
SQL
8 lines
189 B
SQL
-- create-folders-and-folders-todos (down)
|
|
|
|
DROP TABLE IF EXISTS folders_todos;
|
|
DROP TABLE IF EXISTS folders;
|
|
|
|
-- leave this as the last line
|
|
DELETE FROM _migrations WHERE id = 'c3d4e5f6';
|