mirror of
https://github.com/Unleash/unleash.git
synced 2025-03-04 00:18:40 +01:00
feat: user trends migration (#6030)
This commit is contained in:
parent
0045fcbcdf
commit
8ab4aa3d0e
18
src/migrations/20240125084701-add-user-trends.js
Normal file
18
src/migrations/20240125084701-add-user-trends.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
exports.up = function(db, cb) {
|
||||||
|
db.runSql(
|
||||||
|
`
|
||||||
|
CREATE TABLE IF NOT EXISTS user_trends (
|
||||||
|
id VARCHAR(255) PRIMARY KEY,
|
||||||
|
total_users INTEGER NOT NULL,
|
||||||
|
active_users INTEGER NOT NULL,
|
||||||
|
created_at TIMESTAMP default now()
|
||||||
|
);`,
|
||||||
|
cb,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.down = function(db, cb) {
|
||||||
|
db.runSql('DROP TABLE IF EXISTS user_trends;', cb);
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user