mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-10 17:53:36 +02:00
fix: decouple metrics from ofter-read table
Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
parent
db6dd27d04
commit
6aa8aa06fa
@ -6,12 +6,12 @@ exports.up = function (db, cb) {
|
||||
CREATE TABLE IF NOT EXISTS feature_environments_metrics(
|
||||
environment varchar(100) not null
|
||||
references environments(name)
|
||||
on delete cascade,
|
||||
ON DELETE CASCADE,
|
||||
feature_name varchar(255) not null
|
||||
references features(name)
|
||||
on delete cascade,
|
||||
ON DELETE CASCADE,
|
||||
last_seen_at timestamp with time zone,
|
||||
primary key (environment, feature_name)
|
||||
PRIMARY KEY (environment, feature_name)
|
||||
);
|
||||
|
||||
INSERT INTO feature_environments_metrics (environment, feature_name, last_seen_at)
|
||||
@ -103,7 +103,8 @@ exports.down = function (db, cb) {
|
||||
LEFT JOIN environments ON feature_environments.environment = environments.name
|
||||
LEFT JOIN feature_strategy_segment as fss ON fss.feature_strategy_id = feature_strategies.id;
|
||||
|
||||
DROP TABLE IF EXISTS feature_environments_metrics
|
||||
|
||||
DROP TABLE IF EXISTS feature_environments_metrics;
|
||||
`,
|
||||
cb,
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user