How would this work for a team of db devs? Would we need to work from the same branch with frequent pull/push or separate branches and merge back into a community branch where conflicts are resolved?
Thanks for the question! When collaborating on migrations in separate branches, Graphile Migrate emphasizes a linear commit approach (both git commits as well as migration commits). That is what is so nice about their approach, because if follows a simple git workflow: Let's say you're adding a new table and your colleague is modifying a column. Whoever finishes first merges their branch into main. Crucially, they then run `graphile-migrate commit` right after merging. This locks in their changes as a migration file. You then merge or rebase your branch to include the changes from main. Possibly resolving some migration issues if the changes between colleagues are now incompatible and then merge into master. Then you run `graphile-migrate commit` immediately, for your changes, and you're done! This keeps your migration history clean and your database changes predictable. Just like a regular git rebase workflow. There is some info about this in the documentation here: github.com/graphile/migrate?tab=readme-ov-file#collaboration
Woah - very inspiring stuff
Glad you've enjoyed!
or `npx graphile-migrate init`
How would this work for a team of db devs? Would we need to work from the same branch with frequent pull/push or separate branches and merge back into a community branch where conflicts are resolved?
Thanks for the question! When collaborating on migrations in separate branches, Graphile Migrate emphasizes a linear commit approach (both git commits as well as migration commits). That is what is so nice about their approach, because if follows a simple git workflow:
Let's say you're adding a new table and your colleague is modifying a column. Whoever finishes first merges their branch into main. Crucially, they then run `graphile-migrate commit` right after merging. This locks in their changes as a migration file. You then merge or rebase your branch to include the changes from main. Possibly resolving some migration issues if the changes between colleagues are now incompatible and then merge into master. Then you run `graphile-migrate commit` immediately, for your changes, and you're done! This keeps your migration history clean and your database changes predictable. Just like a regular git rebase workflow.
There is some info about this in the documentation here: github.com/graphile/migrate?tab=readme-ov-file#collaboration
954th sub
Thank you so much! We're so close to 1K!