1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/src/migrations/20230227123106-add-setting-for-sign-on-log-retention.js
Christopher Kolstad 0a67cfed67
chore: Renames login_events to sign_on_log (#3203)
This makes the distinction from the event services clearer.

In enterprise we'll also rename LoginEventService etc to reflect this
rename.

In addition this adds a setting for how long of a retention one should have, defaulting to 336 hours (2 weeks)
2023-02-27 14:42:13 +00:00

11 lines
287 B
JavaScript

exports.up = function (db, cb) {
db.runSql(
`INSERT INTO settings(name, content) VALUES ('sign_on_log_retention', '{"hours": 336}')`,
cb,
);
};
exports.down = function (db, cb) {
db.runSql(`DELETE FROM settings WHERE name = 'sign_on_log_retention'`, cb);
};