migrate
migrate copied to clipboard
Module update needed (Cloud Spanner parsing issue)
Is your feature request related to a problem? Please describe. Attempting to apply a migration to a Spanner DB which adds a stored column results in a parsing failure:
ALTER TABLE entities ADD COLUMN shard INT64 AS (MOD(FARM_FINGERPRINT(id), 128)) STORED;
result: 2022/07/08 12:24:08 error: :1.51: got "(" while expecting ")"
Describe the solution you'd like Update the go modules, particular for cloud.google.com/go/spanner.
Checking out the source and running go mod update, gave me the follow update for spanner:
- cloud.google.com/go/spanner v1.28.0
+ cloud.google.com/go/spanner v1.34.1
After that change, migrate is able to apply the migration without error.
Describe alternatives you've considered Current workaround is to clone project and update dependencies locally.
Additional context