forked from GoogleCloudPlatform/professional-services
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.sql
27 lines (23 loc) · 744 Bytes
/
schema.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
CREATE TABLE `Parent` (
ParentId INT64 NOT NULL,
) PRIMARY KEY (ParentId);
CREATE TABLE Child01 (
ParentId INT64 NOT NULL,
Child01Id INT64 NOT NULL,
) PRIMARY KEY (ParentId, Child01Id),
INTERLEAVE IN PARENT `Parent` ON DELETE CASCADE;
CREATE TABLE Child02 (
ParentId INT64 NOT NULL,
Child02Id INT64 NOT NULL,
) PRIMARY KEY (ParentId, Child02Id),
INTERLEAVE IN PARENT `Parent` ON DELETE CASCADE;
CREATE TABLE Child03 (
ParentId INT64 NOT NULL,
Child03Id INT64 NOT NULL,
) PRIMARY KEY (ParentId, Child03Id),
INTERLEAVE IN PARENT `Parent` ON DELETE CASCADE;
CREATE TABLE Child04 (
ParentId INT64 NOT NULL,
Child04Id INT64 NOT NULL,
) PRIMARY KEY (ParentId, Child04Id),
INTERLEAVE IN PARENT `Parent` ON DELETE CASCADE