mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-26 13:48:33 +02:00
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)
This commit is contained in:
parent
7a52552485
commit
0a67cfed67
@ -0,0 +1,7 @@
|
||||
exports.up = function (db, cb) {
|
||||
db.runSql(`ALTER TABLE login_events RENAME TO sign_on_log`, cb);
|
||||
};
|
||||
|
||||
exports.down = function (db, cb) {
|
||||
db.runSql(`ALTER TABLE sign_on_log RENAME TO login_events`, cb);
|
||||
};
|
@ -0,0 +1,10 @@
|
||||
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);
|
||||
};
|
@ -48,7 +48,7 @@ test('should getAll', async () => {
|
||||
await stores.settingStore.insert('unleash.custom.2', { b: 'hello' });
|
||||
await stores.settingStore.insert('unleash.custom.3', { b: 'hello' });
|
||||
const ret = await stores.settingStore.getAll();
|
||||
expect(ret).toHaveLength(5);
|
||||
expect(ret).toHaveLength(6);
|
||||
});
|
||||
|
||||
test('should exists', async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user