Skip to content

Commit

Permalink
schema/mysql: add environment_id, remove duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
oxzi committed Nov 20, 2024
1 parent 7e8e1eb commit 7c536e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 6 additions & 0 deletions schema/mysql/upgrades/dependencies.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
CREATE TABLE `dependency` (
`id` binary(20) NOT NULL,
`environment_id` binary(20) NOT NULL,
`name` text NOT NULL,
`display_name` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;

-- TODO
CREATE TABLE `dependency_state` (
`id` binary(20) NOT NULL,
`dependency_id` binary(20) NOT NULL,
Expand All @@ -16,11 +18,13 @@ CREATE TABLE `dependency_state` (

CREATE TABLE `redundancy_group` (
`id` binary(20) NOT NULL,
`environment_id` binary(20) NOT NULL,
`name` text NOT NULL,
`display_name` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;

-- TODO
CREATE TABLE `redundancy_group_state` (
`id` binary(20) NOT NULL,
`redundancy_group_id` binary(20) NOT NULL,
Expand All @@ -33,6 +37,7 @@ CREATE TABLE `redundancy_group_state` (

CREATE TABLE `dependency_node` (
`id` binary(20) NOT NULL,
`environment_id` binary(20) NOT NULL,
`host_id` binary(20) DEFAULT NULL,
`service_id` binary(20) DEFAULT NULL,
`redundancy_group_id` binary(20) DEFAULT NULL,
Expand All @@ -46,6 +51,7 @@ CREATE TABLE `dependency_node` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;

CREATE TABLE `dependency_edge` (
`environment_id` binary(20) NOT NULL,
`to_node_id` binary(20) NOT NULL,
`from_node_id` binary(20) NOT NULL,
`dependency_id` binary(20) DEFAULT NULL,
Expand Down
2 changes: 0 additions & 2 deletions schema/mysql/upgrades/dependencies2.sql

This file was deleted.

0 comments on commit 7c536e2

Please sign in to comment.