Skip to content

feat(sql-migrate/examples): add pg-todos example app#95

Open
coolaj86 wants to merge 3 commits into
mainfrom
feat-pg-todos-example-only
Open

feat(sql-migrate/examples): add pg-todos example app#95
coolaj86 wants to merge 3 commits into
mainfrom
feat-pg-todos-example-only

Conversation

@coolaj86

@coolaj86 coolaj86 commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Full-featured PostgreSQL todo app demonstrating sqlmigrate + pgmigrate + sqlc:

  • Embedded migrations via //go:embed + sqlmigrate.Collect(fsys, "sql/migrations")
  • Per-command autoMigrate pattern (skipped for migrate subcommand)
  • sqlc-generated queries (pgx/v5)
  • Deterministic idempotent seed data (ON CONFLICT DO NOTHING)
  • CRUD: add, list, done, rm, folder management
  • Uses tagged sqlmigrate v1.0.1 and pgmigrate v1.0.0 (no replace directives)

Test plan

  • go build ./...
  • Integration tested against live PostgreSQL
  • Seed idempotency verified

@coolaj86 coolaj86 force-pushed the feat-pg-todos-example branch from 8c7f2e4 to 557567e Compare April 8, 2026 09:32
@coolaj86 coolaj86 force-pushed the feat-pg-todos-example-only branch from 52c30a7 to 145f2b6 Compare April 8, 2026 09:33
@coolaj86 coolaj86 changed the base branch from feat-pg-todos-example to feat-pgmigrate April 8, 2026 09:34
@coolaj86 coolaj86 force-pushed the feat-pg-todos-example-only branch 2 times, most recently from 6a2c34d to 2ce150f Compare April 8, 2026 20:20
@coolaj86 coolaj86 force-pushed the feat-pg-todos-example-only branch from 2ce150f to 81b5357 Compare April 8, 2026 20:26
@coolaj86 coolaj86 force-pushed the feat-pg-todos-example-only branch from 81b5357 to edb1da6 Compare April 8, 2026 20:40
@coolaj86 coolaj86 force-pushed the feat-pg-todos-example-only branch from edb1da6 to 82c689c Compare April 8, 2026 21:05
@coolaj86 coolaj86 force-pushed the feat-pgmigrate branch 4 times, most recently from 58c6301 to b5d9c7f Compare April 9, 2026 08:14
Base automatically changed from feat-pgmigrate to main April 9, 2026 08:16
@coolaj86 coolaj86 force-pushed the feat-pg-todos-example-only branch from 82c689c to 36ebd8a Compare April 9, 2026 08:18
@socket-security

socket-security Bot commented Apr 9, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedgithub.com/​therootcompany/​golib/​database/​sqlmigrate/​pgmigrate@​v1.0.210010010010070

View full report

@coolaj86 coolaj86 force-pushed the feat-pg-todos-example-only branch 2 times, most recently from 1647c50 to 32e19dd Compare April 9, 2026 09:48
coolaj86 added 3 commits April 9, 2026 13:48
pgmigrate.New now requires *pgx.Conn (not *pgxpool.Pool).
The pool is still used for app queries via sqlc/tododb.
Published v1.0.2 still has old API; use local modules until next release.
@coolaj86 coolaj86 force-pushed the feat-pg-todos-example-only branch from 32e19dd to b1f6e48 Compare April 9, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant