summaryrefslogtreecommitdiff
path: root/packages/backend
diff options
context:
space:
mode:
authorMar0xy <marie@kaifa.ch>2023-11-17 15:17:47 +0100
committerMar0xy <marie@kaifa.ch>2023-11-17 15:17:47 +0100
commit13600e0abc794256fcce41bc439cde7f4d8917d7 (patch)
treee7a67baecd0127edbb5e116f26665449d23f47d5 /packages/backend
parentupd: completely change handling of `indexable` (diff)
downloadsharkey-13600e0abc794256fcce41bc439cde7f4d8917d7.tar.gz
sharkey-13600e0abc794256fcce41bc439cde7f4d8917d7.tar.bz2
sharkey-13600e0abc794256fcce41bc439cde7f4d8917d7.zip
upd: keep choice in `indexable` migration update
Diffstat (limited to 'packages/backend')
-rw-r--r--packages/backend/migration/1700228972000-update-indexable.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/backend/migration/1700228972000-update-indexable.js b/packages/backend/migration/1700228972000-update-indexable.js
index 30db7529b2..e724e2ec7e 100644
--- a/packages/backend/migration/1700228972000-update-indexable.js
+++ b/packages/backend/migration/1700228972000-update-indexable.js
@@ -4,11 +4,11 @@ export class UpdateIndexable1700228972000 {
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "isIndexable" TO "noindex"`);
await queryRunner.query(`ALTER TABLE "user" ALTER COLUMN "noindex" SET DEFAULT false`);
- await queryRunner.query(`UPDATE "user" SET "noindex" = false WHERE "noindex" = true`);
+ await queryRunner.query(`UPDATE "user" SET "noindex" = NOT "noindex"`);
}
async down(queryRunner) {
- await queryRunner.query(`UPDATE "user" SET "noindex" = true WHERE "noindex" = false`);
+ await queryRunner.query(`UPDATE "user" SET "noindex" = NOT "noindex"`);
await queryRunner.query(`ALTER TABLE "user" ALTER COLUMN "noindex" SET DEFAULT true`);
await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "noindex" TO "isIndexable"`);
}