Skip to content

feat(spanner/spansql): add support for foreign key actions#8296

Merged
rahul2393 merged 3 commits intogoogleapis:mainfrom
toga4:foreign-key-actions
Jul 24, 2023
Merged

feat(spanner/spansql): add support for foreign key actions#8296
rahul2393 merged 3 commits intogoogleapis:mainfrom
toga4:foreign-key-actions

Conversation

@toga4
Copy link
Copy Markdown
Contributor

@toga4 toga4 commented Jul 20, 2023

This PR adds support for foreign key actions

CREATE TABLE ShoppingCarts (
  CartId INT64 NOT NULL,
  CustomerId INT64 NOT NULL,
  CustomerName STRING(MAX) NOT NULL,
  CONSTRAINT FKShoppingCartsCustomers FOREIGN KEY(CustomerId, CustomerName)
    REFERENCES Customers(CustomerId, CustomerName) ON DELETE CASCADE,
) PRIMARY KEY(CartId);

ALTER TABLE ShoppingCarts ADD CONSTRAINT FKShoppingCartsCustomers FOREIGN KEY(CustomerId, CustomerName)
    REFERENCES Customers(CustomerId, CustomerName) ON DELETE NO ACTION,

@toga4 toga4 requested review from a team July 20, 2023 13:31
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: spanner Issues related to the Spanner API. labels Jul 20, 2023
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 24, 2023
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the Spanner API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants