Skip to content

Commit 482443f

Browse files
authored
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.
1 parent 5f238d6 commit 482443f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
exports.up = (db, callback) => {
3+
db.runSql(
4+
`
5+
CREATE TABLE IF NOT EXISTS request_count_consumption(
6+
day DATE NOT NULL,
7+
metered_group TEXT NOT NULL,
8+
requests BIGINT NOT NULL DEFAULT 0,
9+
PRIMARY KEY(day, metered_group)
10+
);
11+
`,
12+
callback,
13+
);
14+
};
15+
16+
exports.down = (db, callback) => {
17+
db.runSql(
18+
`
19+
DROP TABLE IF EXISTS request_count_consumption;
20+
`,
21+
callback,
22+
);
23+
};

0 commit comments

Comments
 (0)