1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00
unleash.unleash/src/migrations/20240102142100-incoming-webhooks-created-by.js
Gastón Fournier 2a1c0616e0
feat: support null created_by_user_id (#5744)
## About the changes
Creating an incoming webhook with an admin token means we can't
correlate the action with a real user. In this case we should support
null.
2024-01-02 17:53:29 +01:00

14 lines
328 B
JavaScript

exports.up = function (db, cb) {
db.runSql(
`
ALTER TABLE incoming_webhooks ALTER COLUMN created_by_user_id DROP NOT NULL;
ALTER TABLE incoming_webhook_tokens ALTER COLUMN created_by_user_id DROP NOT NULL;
`,
cb,
);
};
exports.down = function (db, callback) {
callback();
};