Skip to content

Better support env specific sql - #31

Merged
aersam merged 3 commits into
mainfrom
worktree-env-sql-tag
Sep 8, 2026
Merged

aersam merged 3 commits into
mainfrom
worktree-env-sql-tag

Conversation

@aersam

@aersam aersam commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

aersam and others added 3 commits September 8, 2026 06:56
…nvention

testdb up/reset and migrate check/apply now accept --env to select which
environment-tagged SQL files are in scope. testdb defaults to local_test;
migrate's --env is optional and applies no filtering when omitted, matching
today's behavior. Untagged files always apply.
…docs

Adds unit tests for pgdevkit.envtag, migrate list_migration_files/pending_migrations
env filtering, and integration tests for apply_schema's env-tagged file handling.
Documents the <name>.<env>.sql convention in README, SKILL.md, and database-layout.md.
Resolves conflicts between the new <name>.<env>.sql environment-tag
convention and main's --schema/--exclude-schema filtering (both landed
concurrently and touched the same _iter_sql_files/apply_schema/ensure_testdb
signatures). Also fixes a bug the code review caught: the .test_data.json
seed-file lookup for an env-tagged table file (e.g. widget.prod.sql) now
strips the env suffix before building the seed filename, so it correctly
resolves to widget.test_data.json instead of widget.prod.test_data.json.

Bumps version to 0.6.0 for the new environment-tag feature.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LKDneV8brSdCcZst6GaK9w
@aersam
aersam merged commit b6c8ae1 into main Sep 8, 2026
2 checks passed
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