Skip to content

Commit

Permalink
fix: mattermost to integration providers table miration
Browse files Browse the repository at this point in the history
  • Loading branch information
BartoszJarocki committed Dec 22, 2021
1 parent 7f99e88 commit 8e8d5e1
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ export async function down() {
)
)
await Promise.all(mattermostAuthsToInsert)
const tokenDeletionQueries = mattermostTokensWithProvider.map((row) =>
client.query(
`
DELETE FROM "IntegrationToken" WHERE "providerId" = $1 AND "userId" = $2 AND "teamId" = $3;
`,
[row.providerId, row.userId, row.teamId]
)
)
await Promise.all(tokenDeletionQueries)
await client.query(
`
DELETE FROM "IntegrationProvider" WHERE "id" = ANY($1::int[]);
Expand Down

0 comments on commit 8e8d5e1

Please sign in to comment.