fix(backend): 1702718871541-ffVisibility.jsのdownが壊れている (#12767)
This commit is contained in:
parent
42cc909c5b
commit
f743cba26b
1 changed files with 3 additions and 1 deletions
|
@ -24,9 +24,11 @@ export class ffVisibility1702718871541 {
|
||||||
async down(queryRunner) {
|
async down(queryRunner) {
|
||||||
await queryRunner.query(`CREATE TYPE "public"."user_profile_ffvisibility_enum" AS ENUM('public', 'followers', 'private')`);
|
await queryRunner.query(`CREATE TYPE "public"."user_profile_ffvisibility_enum" AS ENUM('public', 'followers', 'private')`);
|
||||||
await queryRunner.query(`ALTER TABLE "user_profile" ADD "ffVisibility" "public"."user_profile_ffvisibility_enum" NOT NULL DEFAULT 'public'`);
|
await queryRunner.query(`ALTER TABLE "user_profile" ADD "ffVisibility" "public"."user_profile_ffvisibility_enum" NOT NULL DEFAULT 'public'`);
|
||||||
|
|
||||||
await queryRunner.query(`CREATE CAST ("public"."user_profile_followingvisibility_enum" AS "public"."user_profile_ffvisibility_enum") WITH INOUT AS ASSIGNMENT`);
|
await queryRunner.query(`CREATE CAST ("public"."user_profile_followingvisibility_enum" AS "public"."user_profile_ffvisibility_enum") WITH INOUT AS ASSIGNMENT`);
|
||||||
await queryRunner.query(`UPDATE "user_profile" SET ffVisibility = "user_profile"."followingVisibility"`);
|
await queryRunner.query(`UPDATE "user_profile" SET "ffVisibility" = "followingVisibility"`);
|
||||||
await queryRunner.query(`DROP CAST ("public"."user_profile_followingvisibility_enum" AS "public"."user_profile_ffvisibility_enum")`);
|
await queryRunner.query(`DROP CAST ("public"."user_profile_followingvisibility_enum" AS "public"."user_profile_ffvisibility_enum")`);
|
||||||
|
|
||||||
await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "followersVisibility"`);
|
await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "followersVisibility"`);
|
||||||
await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "followingVisibility"`);
|
await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "followingVisibility"`);
|
||||||
await queryRunner.query(`DROP TYPE "public"."user_profile_followersVisibility_enum"`);
|
await queryRunner.query(`DROP TYPE "public"."user_profile_followersVisibility_enum"`);
|
||||||
|
|
Loading…
Reference in a new issue