Closed ashoda closed 7 years ago
@mattes any thoughts on adding multistatement support?
I would like migrations to not be restricted to a single statement. I'm new to this tool, and I'm surprised that that's the case. The reason is that I think some statements only makes sense together, as a unit, like in the example in the OP.
I agree on all of this. Unsure what the best way forward is. Maybe there needs to be some meta language after all.
@mattes what do you think about what's implemented in this PR? The spanner client supports multiple statements for the DDL call. The statements just need to be passed in as a list of statement objects to the UpdateDatabaseDdl
call, and that's what the proposed change accomplishes.
Are you thinking this behavior should be more explicit with the use of some meta language?
Are you thinking this behavior should be more explicit with the use of some meta language?
I more and more think that this is the way forward.
Let me merge this PR for now to make Spanner usable.
Proposed Change:
Support migration steps with multiple statements.
Current Behavior:
Migration steps with multiple statements currently fail with an error like
Syntax error on line x, column x: Expecting \'EOF\' but found an unknown character (\";\")
Example of a migration that currently fails: