stripe / pg-schema-diff

Go library for diffing Postgres schemas and generating SQL migrations
MIT License
270 stars 20 forks source link

Make statement generation and ordering independent #131

Open bplunkett-stripe opened 1 month ago

bplunkett-stripe commented 1 month ago

To do this, every generated statement should be a SQL node. Instead of flattening sql graphs in nested sql generators, we leave them as sql graphs and union them into the larger graph.

Every sql statement should have a globally unique id that can be referenced.