fauna-labs / fauna-schema-migrate

The Fauna Schema Migrate tool helps you set up Fauna resources as code and perform schema migrations.
MIT No Attribution
88 stars 11 forks source link

Thoughts on PlanetScale-style db branching? #120

Open lewisl9029 opened 2 years ago

lewisl9029 commented 2 years ago

I recently found out that PlanetScale's db branching is essentially branching just the schema, not data, so when you branch it essentially creates a real empty db with the schema changes that you can develop against and iterate on, and then throw away if it doesn't work out.

I think declarative schema migration tools like fauna-schema-migrate is definitely a step in the right direction compared to traditional approach of writing imperative migration scripts, but TBH the more I learn about the PlanetScale db branching approach the more jealous I become.

I don't plan on switching anytime soon because I much prefer Fauna's consistency model, but I have to wonder if the team has given any thought to potentially implementing this kind of workflow as a first class citizen? Seems like all the primitives (child dbs, declarative migrations, etc) are already available.