1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-03-18 00:19:49 +01:00

feat: frontend consumption table (#9523)

Similar to backend traffic, we have table for frontend traffic. We might
want to rename the backend on to align with this one.
This commit is contained in:
Jaanus Sellin 2025-03-12 16:44:01 +02:00 committed by GitHub
parent 5f238d6b6d
commit 482443f373
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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