|Certified||⏳ Pending certification|
|Ships with Flyway Command-line||Yes|
|Maven Central coordinates||
|Default Java class||
Support Level determines the degree of support available for this database (learn more).
Executing multiple schema changes against Cloud Spanner is comparatively slow due to its need to validate your data. You can read more about it here.
Flyway Teams Edition alleviates this via batching which executes multiple schema changes in one request to minimize latency and improve performance.
To enable batching follow the guide here for your platform.
In the Flyway Command-Line this would look like the following:
> flyway migrate -batch=true
You can find out more about Flyway Teams Edition here.
You must configure a JDBC URL that points to your database. You can configure a connection using this sample URL as an example:
We need to fetch three things to complete this url:
database_name can all be found on the Cloud Spanner web interface. For authentication, we recommend using the ‘keyfile’. This requires creating a service account for Cloud Spanner.
To do this, open
IAM within GCP project settings. There you can create a service account. Upon creating this you’ll have the option to download the keyfile.
The authentication file needs to be accessible to Flyway, so save it somewhere accessible on your machine. Then configure
path_to_service_account to point to this file.
You can learn more about service accounts here.
Set this URL in the
url property in your Flyway configuration.
In a Flyway configuration file.