mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-19 00:15:43 +01:00
## About the changes This PR replaces the old systemUser -1 in user-service.ts with the new SYSTEM_USER -1337 and adds a migration to move events created_by = -1 to -1337 ## Discussion points Does it make sense to do both of these things? Or should we skip the migration? How would this behave in a large system with hundreds of thousands of events, should this be split up?
15 lines
263 B
JavaScript
15 lines
263 B
JavaScript
'use strict';
|
|
|
|
exports.up = function (db, callback) {
|
|
db.runSql(
|
|
`
|
|
UPDATE events SET created_by_user_id = -1337 WHERE created_by_user_id = -1;
|
|
`,
|
|
callback,
|
|
);
|
|
};
|
|
|
|
exports.down = function (db, callback) {
|
|
callback();
|
|
};
|