mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
bbebd293e5
## About the changes Resets created_by_user_id on events incorrectly marked as -1337 when an actual user has been set in created_by column, to clean up after a bug
21 lines
428 B
JavaScript
21 lines
428 B
JavaScript
exports.up = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
UPDATE events SET created_by_user_id = null
|
|
WHERE
|
|
created_by_user_id = -1337 AND
|
|
created_by NOT IN (
|
|
'unknown',
|
|
'migration',
|
|
'init-api-tokens',
|
|
'unleash_system_user',
|
|
'systemuser@getunleash.io');
|
|
`,
|
|
cb,
|
|
);
|
|
};
|
|
|
|
exports.down = function (db, cb) {
|
|
cb();
|
|
};
|