diff options
Diffstat (limited to 'server/initializers/migrations/0560-user-feed-token.ts')
-rw-r--r-- | server/initializers/migrations/0560-user-feed-token.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/initializers/migrations/0560-user-feed-token.ts b/server/initializers/migrations/0560-user-feed-token.ts index 7c61def17..042301352 100644 --- a/server/initializers/migrations/0560-user-feed-token.ts +++ b/server/initializers/migrations/0560-user-feed-token.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import { v4 as uuidv4 } from 'uuid' | 2 | import { buildUUID } from '@server/helpers/uuid' |
3 | 3 | ||
4 | async function up (utils: { | 4 | async function up (utils: { |
5 | transaction: Sequelize.Transaction | 5 | transaction: Sequelize.Transaction |
@@ -26,7 +26,7 @@ async function up (utils: { | |||
26 | const users = await utils.sequelize.query<any>(query, options) | 26 | const users = await utils.sequelize.query<any>(query, options) |
27 | 27 | ||
28 | for (const user of users) { | 28 | for (const user of users) { |
29 | const queryUpdate = `UPDATE "user" SET "feedToken" = '${uuidv4()}' WHERE id = ${user.id}` | 29 | const queryUpdate = `UPDATE "user" SET "feedToken" = '${buildUUID()}' WHERE id = ${user.id}` |
30 | await utils.sequelize.query(queryUpdate) | 30 | await utils.sequelize.query(queryUpdate) |
31 | } | 31 | } |
32 | } | 32 | } |