1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-01 00:08:27 +01:00
unleash.unleash/src/migrations/20240125084701-add-user-trends.js
2024-01-25 12:56:29 +01:00

19 lines
423 B
JavaScript

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