1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-04-15 01:16:22 +02:00

feat: create connection count consumption table (#9444)

This commit is contained in:
Mateusz Kwasniewski 2025-03-10 12:51:11 +01:00 committed by GitHub
parent 4afea5663e
commit dfed9c0773
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,24 @@
exports.up = (db, callback) => {
db.runSql(
`
CREATE TABLE IF NOT EXISTS connection_count_consumption(
day DATE NOT NULL,
metered_group TEXT NOT NULL,
requests BIGINT NOT NULL DEFAULT 0,
connections FLOAT NOT NULL DEFAULT 0,
PRIMARY KEY(day, metered_group)
);
`,
callback,
);
};
exports.down = (db, callback) => {
db.runSql(
`
DROP TABLE IF EXISTS connection_count_consumption;
`,
callback,
);
};