Skip to content
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

FK Actions: Handling interleaving & dropping issues correctly when dropping FKs #871

Merged

Conversation

aasthabharill
Copy link
Collaborator

  1. Interleaving support:
    a. Propagate foreign key action to interleaved table from foreign key
    b. Ensure DDL generated includes on delete action
    Major Changes: Instead of storing parentId as string in Conv, it now stores ParentTable struct containing parent id and on delete action.

  2. Drop issues when foreign key is dropped
    a. Foreign key actions added TableLevelIssues to SchemaIssues of Conv that need to be dropped (both internally and from UI and reports) when foreign key is dropped, while ensuring warnings raised by other FKs remain intact

  3. Unit test coverage added to all code changes (Primarily testing fk->interleaved action migration and SchemaIssues)

aasthabharill-google and others added 28 commits July 3, 2024 12:12
@aasthabharill aasthabharill requested a review from a team as a code owner July 16, 2024 11:39
@aasthabharill aasthabharill removed the request for review from a team July 16, 2024 11:39
accessors/spanner/spanner_accessor_test.go Show resolved Hide resolved
test_data/basic_session_file_test.json Show resolved Hide resolved
webv2/table/review_table_schema_test.go Show resolved Hide resolved
webv2/table/update_table_schema_test.go Show resolved Hide resolved
common/utils/utils.go Outdated Show resolved Hide resolved
spanner/ddl/ast.go Show resolved Hide resolved
webv2/utilities/utilities.go Show resolved Hide resolved
@Deep1998
Copy link
Collaborator

Overall LGTM, please resolve Shreya's comments before merging. Thanks for the changes, this was a rather tricky scenario handling interleaved tables and the issue management.

spanner/ddl/ast_test.go Outdated Show resolved Hide resolved
@Deep1998 Deep1998 merged commit adc87df into GoogleCloudPlatform:master Jul 19, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants