Unable to perform migration using GENERATE_UUID()
tomopy03 opened this issue · 1 comments
tomopy03 commented
Expected Behavior
Creating a migration file using GENERATE_UUID()
should be successful.
The use of GENERATE_UUID()
should be available.
https://cloud.google.com/spanner/docs/primary-key-default-value#universally_unique_identifier_uuid
Current Behavior
Fails with errors like:
Error command: up, version: 1.6.0
failed to parse DDL/DML statements: 000001.sql:2: got "(" while expecting ")", 000001.sql:1.0: unknown DML statement
Steps to Reproduce
- Create the database using wrench:
wrench create --directory ./schema
- Create a new migration file:
wrench migrate create --directory ./schema
# cat ./schema/migrations/000001.sql
CREATE TABLE test (
test_id STRING(36) NOT NULL DEFAULT (GENERATE_UUID())
);
- Run migration:
wrench migrate up --directory ./schema
Context (Environment)
- wrench version: 1.6.0
tomopy03 commented
Solved to v1.7.0.
Thank you for updated!