Skip to content

Commit dfed9c0

Browse files
authored
feat: create connection count consumption table (#9444)
1 parent 4afea56 commit dfed9c0

File tree

1 file changed

+24
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)