-
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
Creating a Foreign Key constraint with empty ON DELETE causes error #147
Comments
Hey IDispose, Can you help with more context on :
|
@manu2 We are using the emulator to test our migration scripts before code merge. The scripts havent changed in a while and works as expected in emulator version We create a docker container pulling in the most recent version of the emulator and run the migration SQL scripts. The FK reference DOES NOT have |
Thanks for the info. Meanwhile as a workaround, the change seems to have released in v1.48 of cloud spanner go client (googleapis/google-cloud-go#8296), so using an older version should solve the issue temporarily until the above bug is resolved. |
@manu2 thanks for linking the bug. I wonder why then does adding |
There were changes made in v1.5.11 to restrict using foreign key actions until they are implemented in emulator. So either having ON DELETE NO ACTION or not having an ON DELETE clause both should be throwing an error( since the latter is getting converter to ON DELETE NO ACTION as mentioned in the go client bug). |
Oh this is the workaround I need! Neither |
Per documentation
CASCADE
orNO ACTION
is optionalHowever when running a CREATE TABLE statement on the emulator with no ON DELETE throws the following exception
(details: rpc error: code = Unimplemented desc = Foreign key referential action ON DELETE NO ACTION is not supported.)
This regression was introduced in
v1.5.11
The text was updated successfully, but these errors were encountered: