From 138d303da4771b44296cb75b4adbc6a6313b9980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Mon, 18 Dec 2023 17:11:59 +0000 Subject: [PATCH] chore: rename secret to token in incoming_webhook_tokens (#5679) Renames `secret` to `token` in `incoming_webhook_tokens` for consistency. This table is not being used yet, so this should be a very safe change. --- ...inc-webhook-tokens-rename-secret-to-token.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/migrations/20231218165612-inc-webhook-tokens-rename-secret-to-token.js diff --git a/src/migrations/20231218165612-inc-webhook-tokens-rename-secret-to-token.js b/src/migrations/20231218165612-inc-webhook-tokens-rename-secret-to-token.js new file mode 100644 index 0000000000..7358bb3857 --- /dev/null +++ b/src/migrations/20231218165612-inc-webhook-tokens-rename-secret-to-token.js @@ -0,0 +1,17 @@ +exports.up = function (db, cb) { + db.runSql( + ` + ALTER TABLE incoming_webhook_tokens RENAME COLUMN secret TO token; + `, + cb, + ); +}; + +exports.down = function (db, cb) { + db.runSql( + ` + ALTER TABLE incoming_webhook_tokens RENAME COLUMN token TO secret; + `, + cb, + ); +};