Skip to content
Snippets Groups Projects
Verified Commit 13600e0a authored by Mar0xy's avatar Mar0xy
Browse files

upd: keep choice in `indexable` migration update

parent 55ef4c4d
No related branches found
No related tags found
Loading
......@@ -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"`);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment