-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrench should not add ON DELETE NO ACTION
syntax
#95
Comments
As you might have suspected, this behavior isn't actually due to wrench but is caused by cloud.google.com/go/spanner. When wrench applies migrations, it uses the spansql package from cloud.google.com/go/spanner to parse and re-output the DDL. This spansql automatically adds I'll create a Pull Request on cloud.google.com/go/spanner to address this behavior. |
Great, thanks! |
hey @toga4 do you know when the fix might get released for this? I'm stuck on older versions of a few google dependencies until this is fixed, because they all try to upgrade |
Hi @graeme-verticalscope, I have already created a PR at googleapis/google-cloud-go#8968 addressing this issue. |
Found a workaround to enable upgrading wrench to See GoogleCloudPlatform/cloud-spanner-emulator#147 (comment) |
Expected Behavior
When a table is created with a foreign key constraint and no foreign key action is provided, wrench should not add
ON DELETE NO ACTION
to the create table statement.Current Behavior
Wrench adds
ON DELETE NO ACTION
, changing the statement syntax.Steps to Reproduce
script 1:
ON DELETE NO ACTION
is being added by wrench. If it wasn't being added by wrench, then second migration would succeed.Context (Environment)
v1.6.0
v1.47.0
tov1.49.0
v1.5.0
if I upgrade cloud.google.com/go/spanner tov1.49.0
.This change breaks my local and CI environments that use the emulator:
I have already created an issue in cloud spanner emulator: GoogleCloudPlatform/cloud-spanner-emulator#142 but I was told the fix should be on the wrench side, not the emulator side.
The text was updated successfully, but these errors were encountered: