[Question] Why not use `pg_dump --schema-only` to populate temporary database?

Open
#170 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go, postgres
Domain
databases

Research direction

Start by tracing assertValidPlan and fetchNamedSchemas to find how the temporary database is currently populated. Check how pg_dump --schema-only could be run for each returned schema, then verify that composite types are present and setup no longer fails in assertValidPlan.

Written by the indexing model from the issue text.

Description

I've been facing some frustrating issues with the temporary database. Specifically, composite types aren't copied into it, leading to failed setup within assertValidPlan.

Instead of generating migration statements to setup the temporary database, we should dump every schema returned by fetchNamedSchemas and run those dump files on the temporary database.

Dominant language
Go
Stars
884
Forks
82
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stripe/pg-schema-diff

All issues in stripe/pg-schema-diff

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.