8 Commits

Author SHA1 Message Date
fbb4a14620
chore(git): ignore worktrees and vim swap files 2026-04-13 17:14:08 -06:00
3402b60bc6
fix(sqlmigrate): defensive table-missing check at rows.Err() across backends
Apply the same lazy-error pattern fix to all backends, plus regression
tests that catch the bug.

pgmigrate is the confirmed-broken case (pgx/v5's Conn.Query is lazy and
surfaces 42P01 at rows.Err() once the prepared statement cache is primed).
The defensive check at rows.Err() is also added to mymigrate and msmigrate
in case their drivers exhibit similar behavior in some configurations.

litemigrate is refactored to probe sqlite_master with errors.Is(sql.ErrNoRows)
instead of string-matching the error message — SQLite returns the generic
SQLITE_ERROR code for "no such table" so a typed-error approach isn't
possible at the driver layer; the probe lets us use idiomatic errors.Is.

Tests:
- litemigrate: in-memory SQLite, runs on every go test (no infra)
- pgmigrate:   PG_TEST_URL env-gated; verified against real Postgres,
               TestAppliedAfterDropTable reproduces the agent's exact error
               message ("reading rows: ... 42P01") without the fix
- mymigrate:   MYSQL_TEST_DSN env-gated
- msmigrate:   MSSQL_TEST_URL env-gated; verified against real SQL Server

Each backend has four cases: missing table, populated table, empty table,
and table-dropped-after-cache-primed (the lazy-error scenario).
2026-04-10 00:15:06 -06:00
698137576a
chore: add 'dist/' to .gitignore 2026-03-01 00:18:32 -07:00
a56f8601f0
chore: add cmd binaries to .gitignore 2026-02-27 02:56:28 -07:00
c6b55feb78
chore: add .DS_Store to .gitignore 2026-02-27 01:55:24 -07:00
cbacf9ffc9
chore: add credentials.tsv to .gitignore 2026-02-27 00:17:31 -07:00
0a78632482
chore: add .env variations to .gitignore 2026-01-28 16:42:03 -07:00
d9389f1f4b
Initial commit 2021-03-10 16:23:40 -07:00