mirror of
https://git.boykissers.com/pawkey/pawkey-sk.git
synced 2025-12-20 04:04:16 +00:00
upd: keep choice in indexable migration update
This commit is contained in:
@@ -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"`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user