Skip to content

Commit 8501b04

Browse files
authored
Remove foreign key from MySQL visibility schema (#3937)
1 parent 2d9bb16 commit 8501b04

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

schema/mysql/v8/visibility/schema.sql

+1-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ CREATE TABLE custom_search_attributes (
109109
KeywordList02 JSON GENERATED ALWAYS AS (search_attributes->"$.KeywordList02"),
110110
KeywordList03 JSON GENERATED ALWAYS AS (search_attributes->"$.KeywordList03"),
111111

112-
PRIMARY KEY (namespace_id, run_id),
113-
FOREIGN KEY (namespace_id, run_id) REFERENCES executions_visibility (namespace_id, run_id) ON DELETE CASCADE
112+
PRIMARY KEY (namespace_id, run_id)
114113
);
115114

116115
CREATE INDEX by_bool_01 ON custom_search_attributes (namespace_id, Bool01);

schema/mysql/v8/visibility/versioned/v1.2/advanced_visibility.sql

+1-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ CREATE TABLE custom_search_attributes (
9595
KeywordList02 JSON GENERATED ALWAYS AS (search_attributes->"$.KeywordList02"),
9696
KeywordList03 JSON GENERATED ALWAYS AS (search_attributes->"$.KeywordList03"),
9797

98-
PRIMARY KEY (namespace_id, run_id),
99-
FOREIGN KEY (namespace_id, run_id) REFERENCES executions_visibility (namespace_id, run_id) ON DELETE CASCADE
98+
PRIMARY KEY (namespace_id, run_id)
10099
);
101100

102101
CREATE INDEX by_bool_01 ON custom_search_attributes (namespace_id, Bool01);

0 commit comments

Comments
 (0)