From 556c0aff356071080bfd238587f75790cd05fdb3 Mon Sep 17 00:00:00 2001 From: orangecoding Date: Tue, 17 Mar 2026 11:26:23 +0100 Subject: [PATCH] fixing duplicate migration --- .../{11.mcp-tokens.js => 12.mcp-tokens.js} | 5 +++- package.json | 4 +-- yarn.lock | 26 +++++++++---------- 3 files changed, 19 insertions(+), 16 deletions(-) rename lib/services/storage/migrations/sql/{11.mcp-tokens.js => 12.mcp-tokens.js} (82%) diff --git a/lib/services/storage/migrations/sql/11.mcp-tokens.js b/lib/services/storage/migrations/sql/12.mcp-tokens.js similarity index 82% rename from lib/services/storage/migrations/sql/11.mcp-tokens.js rename to lib/services/storage/migrations/sql/12.mcp-tokens.js index b627424..c39072f 100644 --- a/lib/services/storage/migrations/sql/11.mcp-tokens.js +++ b/lib/services/storage/migrations/sql/12.mcp-tokens.js @@ -13,7 +13,10 @@ import crypto from 'crypto'; // Each user gets a permanent, non-expiring secret token used for MCP API authentication. // Tokens are auto-generated for all existing users during this migration. export function up(db) { - db.exec(`ALTER TABLE users ADD COLUMN mcp_token TEXT`); + const columns = db.prepare(`PRAGMA table_info(users)`).all(); + if (!columns.some((col) => col.name === 'mcp_token')) { + db.exec(`ALTER TABLE users ADD COLUMN mcp_token TEXT`); + } // Backfill all existing users that don't have a token yet const users = db.prepare(`SELECT id FROM users WHERE mcp_token IS NULL`).all(); diff --git a/package.json b/package.json index 1c011b4..b095e4e 100755 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "react-range-slider-input": "^3.3.2", "react-router": "7.13.1", "react-router-dom": "7.13.1", - "resend": "^6.9.3", + "resend": "^6.9.4", "restana": "5.1.0", "semver": "^7.7.4", "serve-static": "2.2.1", @@ -106,7 +106,7 @@ "devDependencies": { "@babel/core": "7.29.0", "@babel/eslint-parser": "7.28.6", - "@babel/preset-env": "7.29.0", + "@babel/preset-env": "7.29.2", "@babel/preset-react": "7.28.5", "@eslint/js": "^10.0.1", "chalk": "^5.6.2", diff --git a/yarn.lock b/yarn.lock index e59c566..21cf386 100644 --- a/yarn.lock +++ b/yarn.lock @@ -727,10 +727,10 @@ "@babel/helper-create-regexp-features-plugin" "^7.28.5" "@babel/helper-plugin-utils" "^7.28.6" -"@babel/preset-env@7.29.0": - version "7.29.0" - resolved "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.29.0.tgz" - integrity sha512-fNEdfc0yi16lt6IZo2Qxk3knHVdfMYX33czNb4v8yWhemoBhibCpQK/uYHtSKIiO+p/zd3+8fYVXhQdOVV608w== +"@babel/preset-env@7.29.2": + version "7.29.2" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.29.2.tgz#5a173f22c7d8df362af1c9fe31facd320de4a86c" + integrity sha512-DYD23veRYGvBFhcTY1iUvJnDNpuqNd/BzBwCvzOTKUnJjKg5kpUBh3/u9585Agdkgj+QuygG7jLfOPWMa2KVNw== dependencies: "@babel/compat-data" "^7.29.0" "@babel/helper-compilation-targets" "^7.28.6" @@ -6730,13 +6730,13 @@ require-from-string@^2.0.2: resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== -resend@^6.9.3: - version "6.9.3" - resolved "https://registry.yarnpkg.com/resend/-/resend-6.9.3.tgz#4eb7f235b8f0049ee9f0208587939b8c953c6d5f" - integrity sha512-GRXjH9XZBJA+daH7bBVDuTShr22iWCxXA8P7t495G4dM/RC+d+3gHBK/6bz9K6Vpcq11zRQKmD+B+jECwQlyGQ== +resend@^6.9.4: + version "6.9.4" + resolved "https://registry.yarnpkg.com/resend/-/resend-6.9.4.tgz#2d5a08e294b1dd1985531a9c51e7e6a48caf1549" + integrity sha512-/M3dsJzu5OgozqVsA4Psd/1L7EdePgOIIxClas453GOQYFG3VHc2ZyCHZFlvqsc9aZCCd2BJRRqZgWC8D9c7/g== dependencies: postal-mime "2.7.3" - svix "1.84.1" + svix "1.86.0" resolve-from@^4.0.0: version "4.0.0" @@ -7371,10 +7371,10 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -svix@1.84.1: - version "1.84.1" - resolved "https://registry.yarnpkg.com/svix/-/svix-1.84.1.tgz#9e086455acf01143fe0f90c5f618393c3e3591cf" - integrity sha512-K8DPPSZaW/XqXiz1kEyzSHYgmGLnhB43nQCMeKjWGCUpLIpAMMM8kx3rVVOSm6Bo6EHyK1RQLPT4R06skM/MlQ== +svix@1.86.0: + version "1.86.0" + resolved "https://registry.yarnpkg.com/svix/-/svix-1.86.0.tgz#f56818d2e45d1ca0d2e7fc50598eda6695a8cb09" + integrity sha512-/HTvXwjLJe1l/MsLXAO1ddCYxElJk4eNR4DzOjDOEmGrPN/3BtBE8perGwMAaJ2sT5T172VkBYzmHcjUfM1JRQ== dependencies: standardwebhooks "1.0.0" uuid "^10.0.0"