Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB schema migration support #91

Closed
bryanchriswhite opened this issue Sep 13, 2022 · 0 comments · Fixed by #152 or #163
Closed

DB schema migration support #91

bryanchriswhite opened this issue Sep 13, 2022 · 0 comments · Fixed by #152 or #163
Labels
C-enhancement Category: New feature or request C-investigation Category: Tracking an investigation or PoC

Comments

@bryanchriswhite
Copy link

bryanchriswhite commented Sep 13, 2022

Background

Currently, have to re-index the entire network any time we want to deploy a schema change. This is undesirable because it increases the complexity of our infrastructure and significantly increases the lower bound on how quickly the indexer can sync up with a given network after a schema change.

Proposal

Consider using migrate which is part of the Graphile suite and is intended to work alongside Postgraphile (which we're also using).

Acceptance criteria

  1. Add migrate and dependencies
  2. Add a section to the readme explaining or linking to how to use

Test coverage over:
Example use cases:

  • adding an entity
  • changing a field's data type
  • changing a @jsonField type (add/remove/etc. its properties)
  • removing an entity (too many questions, need more discussion)

meaning:
1. Alter graphql schema
2. Generate DB schema (a. let SubQuery do its thing b. pg_dump or something to dump schema)
3. Assert agains the DB schema diff

It's sufficient to determine that the tool works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: New feature or request C-investigation Category: Tracking an investigation or PoC
Projects
None yet
2 participants