Add 'export postgres' subcommand and refactor 'export' into subcommands#6
Open
Add 'export postgres' subcommand and refactor 'export' into subcommands#6
Conversation
- Rename `export` to `export sqlite` (same behaviour, new invocation) - Add `export postgres --connection <url>` to export a PST to PostgreSQL - Add `postgres = "0.19"` dependency (synchronous client) - Add `docker-compose.yml` for spinning up a test Postgres instance - Add four #[ignore] integration tests for the Postgres export path, runnable with `cargo test -- --ignored` after `docker compose up -d` https://claude.ai/code/session_01EcKP7kwECNc69rSykbQ9Se
Add a postgres 16 service container to the CI job and run the previously-ignored tests with `cargo test -- --ignored`. The connection string matches docker-compose.yml (port 5433). https://claude.ai/code/session_01EcKP7kwECNc69rSykbQ9Se
The ubuntu-slim runner has no Docker daemon so service containers fail. Start the pre-installed system PostgreSQL instead and create the test role/database with psql directly. https://claude.ai/code/session_01EcKP7kwECNc69rSykbQ9Se
ubuntu-slim has no pre-installed postgres and no systemd. Install it with apt and start the cluster using pg_ctlcluster, which works in chroot/container environments. https://claude.ai/code/session_01EcKP7kwECNc69rSykbQ9Se
ubuntu-latest has Docker available so service containers work. Reverts the pg_ctlcluster workaround in favour of the cleaner service container approach. https://claude.ai/code/session_01EcKP7kwECNc69rSykbQ9Se
Parallel tests race to CREATE TABLE the same names, causing a duplicate type error in pg_catalog. --test-threads=1 ensures they run sequentially and each test's drop+create cycle completes without interference. https://claude.ai/code/session_01EcKP7kwECNc69rSykbQ9Se
Table creation is now opt-in. Pass --create-tables to CREATE the schema before exporting; omit it to export into an existing schema. https://claude.ai/code/session_01EcKP7kwECNc69rSykbQ9Se
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.
exporttoexport sqlite(same behaviour, new invocation)export postgres --connection <url>to export a PST to PostgreSQLpostgres = "0.19"dependency (synchronous client)docker-compose.ymlfor spinning up a test Postgres instancerunnable with
cargo test -- --ignoredafterdocker compose up -dhttps://claude.ai/code/session_01EcKP7kwECNc69rSykbQ9Se