Skip to content

Commit

Permalink
feat: support null created_by_user_id (#5744)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
gastonfournier authored Jan 2, 2024
1 parent e993846 commit 2a1c061
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/migrations/20240102142100-incoming-webhooks-created-by.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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();
};

0 comments on commit 2a1c061

Please sign in to comment.