mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
feat: create client_applications_usage table migration (#4521)
Creates client_applications_usage table --------- Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
parent
208ca05933
commit
4ce6c96e04
@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
exports.up = function (db, callback) {
|
||||
db.runSql(
|
||||
`
|
||||
CREATE TABLE IF NOT EXISTS client_applications_usage (
|
||||
app_name VARCHAR(255) REFERENCES client_applications(app_name) ON DELETE CASCADE,
|
||||
project VARCHAR(255) REFERENCES projects(id) ON DELETE CASCADE,
|
||||
environment VARCHAR(100) REFERENCES environments(name) ON DELETE CASCADE,
|
||||
PRIMARY KEY(app_name, project, environment)
|
||||
) ;
|
||||
`,
|
||||
callback,
|
||||
);
|
||||
};
|
||||
|
||||
exports.down = function (db, callback) {
|
||||
db.runSql(
|
||||
`
|
||||
DROP TABLE IF EXISTS client_applications_usage;
|
||||
`,
|
||||
callback,
|
||||
);
|
||||
};
|
Loading…
Reference in New Issue
Block a user