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())
);
3. Run migration:
wrench migrate up --directory ./schema
## Context (Environment)
* wrench version: 1.6.0
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
Expected Behavior
Creating a migration file using
GENERATE_UUID()
should be successful. The use ofGENERATE_UUID()
should be available. https://cloud.google.com/spanner/docs/primary-key-default-value#universally_unique_identifier_uuidCurrent Behavior
Fails with errors like:
Steps to Reproduce
cat ./schema/migrations/000001.sql
CREATE TABLE test ( test_id STRING(36) NOT NULL DEFAULT (GENERATE_UUID()) );
wrench migrate up --directory ./schema