Skip to content

MSSQL testdb: generated-schema apply hook and snapshot/restore reset - #67

Merged
aersam merged 4 commits into
mainfrom
64-mssql-hook-snapshots
Oct 31, 2026
Merged

aersam merged 4 commits into
mainfrom
64-mssql-hook-snapshots

Conversation

@aersam

@aersam aersam commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Part of #64 (item 2), bumps to 0.19.0.

  • ensure_testdb/reset_testdb: apply=callable(conn) and apply_scripts=True (MSSQL only) run generated DDL after or instead of the database/ files.
  • snapshot_testdb(name) / restore_testdb(name) use SQL Server database snapshots: files next to the data files (tmpfs-aware) or in PGDEVKIT_TESTDB_MSSQL_SNAPSHOT_DIR; a restore kicks other sessions off and keeps the snapshot. SQL Server only reverts from a database's sole snapshot, so a restore raises when another exists.
  • Snapshots are dropped with their database and are never reported as orphans.

Live tests cover the round trip (including an open connection), orphan handling and reset.

🤖 Generated with Claude Code

Claude Session: 928b2739-5a21-5fd4-b2a1-23bb76c373be

Docs: the MSSQL testdb section moved from the README to docs/mssql-testdb.md (README keeps a short pointer).

@aersam
aersam merged commit aab84aa into main Oct 31, 2026
2 checks passed
aersam and others added 4 commits October 31, 2026 08:08
…64)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
#64)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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