1
0
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:
Mateusz Kwasniewski 2024-01-25 12:56:29 +01:00 committed by GitHub
parent 0045fcbcdf
commit 8ab4aa3d0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View 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);
};