Fix CI python version mismatch, address minor review findings, add pg…#2
Merged
Conversation
…devkit.db and fetch-missing - CI: bump the workflow's python-version matrix to 3.14 to match requires-python, bump checkout/setup-python actions, and install podman (needed by conftest.py's ensure_testdb() on ubuntu-latest). - schema.py: generalize cross-file dependency tracking beyond tables so views/functions/procedures referencing each other also get correct apply ordering, not just table FKs. Also fix apply_schema's retry pass to re-seed .test_data.json, not just re-run the raw SQL. - query.py: replace naive ';'-splitting with a dollar-quote/string-literal aware statement splitter so run-sql on a file with a plpgsql function body doesn't get cut in half. - container.py: add test coverage for the "name already in use" race fallback branch. - config.py: validate `extensions` is actually a list. - tests/testdb: give test project names a per-process suffix so concurrent pytest runs (e.g. from separate worktrees) against the shared container don't drop each other's databases. - Add pgdevkit.db: an importable psycopg CRUD helper module (PgPool, PostgresTableModel, SqlLoader, pg_retrieve/pg_insert/pg_upsert/...) so projects depend on a version instead of copy-pasting reference files. - Add `pgdb fetch-missing`: reverse-engineers DDL for tables/views/functions that exist in the database but aren't tracked under database/, reusing the existing introspect/diff machinery. - Add docs/database-layout.md as the single source for the database/ folder convention, and a consolidated skills/pgdevkit/SKILL.md superseding postgres-test-setup, postgres-best-practices, and database-in-source (left in place in the separate skills repo for now). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GpwZzpmtp1c1ZHp9LT1Asd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…devkit.db and fetch-missing
extensionsis actually a list.pgdb fetch-missing: reverse-engineers DDL for tables/views/functions that exist in the database but aren't tracked under database/, reusing the existing introspect/diff machinery.Claude-Session: https://claude.ai/code/session_01GpwZzpmtp1c1ZHp9LT1Asd