mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-14 10:05:46 +01:00
upd: keep choice in indexable
migration update
This commit is contained in:
parent
55ef4c4d93
commit
13600e0abc
1 changed files with 2 additions and 2 deletions
|
@ -4,11 +4,11 @@ export class UpdateIndexable1700228972000 {
|
||||||
async up(queryRunner) {
|
async up(queryRunner) {
|
||||||
await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "isIndexable" TO "noindex"`);
|
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(`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) {
|
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" ALTER COLUMN "noindex" SET DEFAULT true`);
|
||||||
await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "noindex" TO "isIndexable"`);
|
await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "noindex" TO "isIndexable"`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue