Skip to content

Commit e35b6da

Browse files
oxziyhabteab
authored andcommitted
schema/mysql: add environment_id, remove duplicates
#795 (review)
1 parent d919eb9 commit e35b6da

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

schema/mysql/upgrades/dependencies.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
CREATE TABLE `dependency` (
22
`id` binary(20) NOT NULL,
3+
`environment_id` binary(20) NOT NULL,
34
`name` text NOT NULL,
45
`display_name` text NOT NULL,
56
PRIMARY KEY (`id`)
67
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
78

9+
-- TODO
810
CREATE TABLE `dependency_state` (
911
`id` binary(20) NOT NULL,
1012
`dependency_id` binary(20) NOT NULL,
@@ -16,11 +18,13 @@ CREATE TABLE `dependency_state` (
1618

1719
CREATE TABLE `redundancy_group` (
1820
`id` binary(20) NOT NULL,
21+
`environment_id` binary(20) NOT NULL,
1922
`name` text NOT NULL,
2023
`display_name` text NOT NULL,
2124
PRIMARY KEY (`id`)
2225
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
2326

27+
-- TODO
2428
CREATE TABLE `redundancy_group_state` (
2529
`id` binary(20) NOT NULL,
2630
`redundancy_group_id` binary(20) NOT NULL,
@@ -33,6 +37,7 @@ CREATE TABLE `redundancy_group_state` (
3337

3438
CREATE TABLE `dependency_node` (
3539
`id` binary(20) NOT NULL,
40+
`environment_id` binary(20) NOT NULL,
3641
`host_id` binary(20) DEFAULT NULL,
3742
`service_id` binary(20) DEFAULT NULL,
3843
`redundancy_group_id` binary(20) DEFAULT NULL,
@@ -46,6 +51,7 @@ CREATE TABLE `dependency_node` (
4651
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
4752

4853
CREATE TABLE `dependency_edge` (
54+
`environment_id` binary(20) NOT NULL,
4955
`to_node_id` binary(20) NOT NULL,
5056
`from_node_id` binary(20) NOT NULL,
5157
`dependency_id` binary(20) DEFAULT NULL,

schema/mysql/upgrades/dependencies2.sql

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)