pressly / goose

A database migration tool. Supports SQL migrations and Go functions.
http://pressly.github.io/goose/
Other
7.02k stars 517 forks source link

Support for GoogleSQL - Google Cloud Spanner Migrations #618

Open tenkoverse opened 1 year ago

tenkoverse commented 1 year ago

As previously discussed, I am looking to support Google Cloud Spanner in a downstream library that uses goose for their built in migrations (they support pg and mysql - thanks to goose).

Unfortunately, In order to add support there for Spanner, it would require goose to add support for GoogleSQL for Google Cloud Spanner.

The library in question is OpenFGA and the part of the code I am referring to is their migrate command .

I have found another tool officially supported by Google called Spanner Migration Tool, but at first glance it seems to be more about migrating schemas from pg/mysql to spanner and not incremental schema updates like goose.

Given how popular and affordable Spanner is getting and especially considering it's capabilities (strong global consistency, infinite scale, 99.999 SLA) it seems like a no brainer.

Would it be possible to add support for GoogleSQL for Google Cloud Spanner?

Thanks! 🙂

mfridman commented 1 year ago

Note to self, to test/develop this implementation can use the emulator:

The gcloud CLI provides a local, in-memory emulator, which you can use to develop and test your applications for free without creating a GCP Project or a billing account. As the emulator stores data only in memory, all state, including data, schema, and configs, is lost on restart. The emulator offers the same APIs as the Spanner production service and is intended for local development and testing, not for production deployments.

https://cloud.google.com/spanner/docs/emulator