-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'eval-v2' into mp/rollouts-ui-its
- Loading branch information
Showing
14 changed files
with
226 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE flags ADD COLUMN type INTEGER DEFAULT 0 NOT NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
CREATE TABLE IF NOT EXISTS rollouts ( | ||
id VARCHAR(255) PRIMARY KEY UNIQUE NOT NULL, | ||
namespace_key VARCHAR(255) NOT NULL REFERENCES namespaces ON DELETE CASCADE, | ||
flag_key VARCHAR(255) NOT NULL, | ||
type INTEGER DEFAULT 0 NOT NULL, | ||
description TEXT NOT NULL, | ||
rank INTEGER DEFAULT 1 NOT NULL, | ||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, | ||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, | ||
FOREIGN KEY (namespace_key, flag_key) REFERENCES flags (namespace_key, key) ON DELETE CASCADE | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS rollout_thresholds ( | ||
id VARCHAR(255) PRIMARY KEY UNIQUE NOT NULL, | ||
namespace_key VARCHAR(255) NOT NULL REFERENCES namespaces ON DELETE CASCADE, | ||
rollout_id VARCHAR(255) UNIQUE NOT NULL REFERENCES rollouts ON DELETE CASCADE, | ||
percentage float DEFAULT 0 NOT NULL, | ||
value BOOLEAN DEFAULT FALSE NOT NULL | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS rollout_segments ( | ||
id VARCHAR(255) PRIMARY KEY UNIQUE NOT NULL, | ||
namespace_key VARCHAR(255) NOT NULL REFERENCES namespaces ON DELETE CASCADE, | ||
rollout_id VARCHAR(255) NOT NULL REFERENCES rollouts ON DELETE CASCADE, | ||
segment_key VARCHAR(255) NOT NULL, | ||
value BOOLEAN DEFAULT FALSE NOT NULL, | ||
FOREIGN KEY (namespace_key, segment_key) REFERENCES segments (namespace_key, key) ON DELETE CASCADE | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE flags ADD COLUMN `type` INTEGER DEFAULT 0 NOT NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
CREATE TABLE IF NOT EXISTS rollouts ( | ||
id VARCHAR(255) UNIQUE NOT NULL, | ||
namespace_key VARCHAR(255) NOT NULL, | ||
flag_key VARCHAR(255) NOT NULL, | ||
type INTEGER DEFAULT 0 NOT NULL, | ||
description TEXT NOT NULL, | ||
`rank` INTEGER DEFAULT 1 NOT NULL, | ||
created_at TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP(6) NOT NULL, | ||
updated_at TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP(6) NOT NULL, | ||
PRIMARY KEY (id), | ||
FOREIGN KEY (namespace_key) REFERENCES namespaces (`key`) ON DELETE CASCADE, | ||
FOREIGN KEY (namespace_key, flag_key) REFERENCES flags (namespace_key, `key`) ON DELETE CASCADE | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS rollout_thresholds ( | ||
id VARCHAR(255) UNIQUE NOT NULL, | ||
namespace_key VARCHAR(255) NOT NULL, | ||
rollout_id VARCHAR(255) UNIQUE NOT NULL, | ||
percentage float DEFAULT 0 NOT NULL, | ||
value BOOLEAN DEFAULT FALSE NOT NULL, | ||
PRIMARY KEY (id), | ||
FOREIGN KEY (namespace_key) REFERENCES namespaces (`key`) ON DELETE CASCADE, | ||
FOREIGN KEY (rollout_id) REFERENCES rollouts (id) ON DELETE CASCADE | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS rollout_segments ( | ||
id VARCHAR(255) UNIQUE NOT NULL, | ||
namespace_key VARCHAR(255) NOT NULL, | ||
rollout_id VARCHAR(255) NOT NULL, | ||
segment_key VARCHAR(255) NOT NULL, | ||
value BOOLEAN DEFAULT FALSE NOT NULL, | ||
PRIMARY KEY (id), | ||
FOREIGN KEY (namespace_key) REFERENCES namespaces (`key`) ON DELETE CASCADE, | ||
FOREIGN KEY (rollout_id) REFERENCES rollouts (id) ON DELETE CASCADE, | ||
FOREIGN KEY (namespace_key, segment_key) REFERENCES segments (namespace_key, `key`) ON DELETE CASCADE | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
CREATE TABLE IF NOT EXISTS rollouts ( | ||
id VARCHAR(255) PRIMARY KEY UNIQUE NOT NULL, | ||
namespace_key VARCHAR(255) NOT NULL REFERENCES namespaces ON DELETE CASCADE, | ||
flag_key VARCHAR(255) NOT NULL, | ||
type INTEGER DEFAULT 0 NOT NULL, | ||
description TEXT NOT NULL, | ||
rank INTEGER DEFAULT 1 NOT NULL, | ||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, | ||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, | ||
FOREIGN KEY (namespace_key, flag_key) REFERENCES flags (namespace_key, key) ON DELETE CASCADE | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS rollout_thresholds ( | ||
id VARCHAR(255) PRIMARY KEY UNIQUE NOT NULL, | ||
namespace_key VARCHAR(255) NOT NULL REFERENCES namespaces ON DELETE CASCADE, | ||
rollout_id VARCHAR(255) UNIQUE NOT NULL REFERENCES rollouts ON DELETE CASCADE, | ||
percentage float DEFAULT 0 NOT NULL, | ||
value BOOLEAN DEFAULT FALSE NOT NULL | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS rollout_segments ( | ||
id VARCHAR(255) PRIMARY KEY UNIQUE NOT NULL, | ||
namespace_key VARCHAR(255) NOT NULL REFERENCES namespaces ON DELETE CASCADE, | ||
rollout_id VARCHAR(255) NOT NULL REFERENCES rollouts ON DELETE CASCADE, | ||
segment_key VARCHAR(255) NOT NULL, | ||
value BOOLEAN DEFAULT FALSE NOT NULL, | ||
FOREIGN KEY (namespace_key, segment_key) REFERENCES segments (namespace_key, key) ON DELETE CASCADE | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE flags ADD COLUMN type INTEGER DEFAULT 0 NOT NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters