2023-07-27 08:31:52 +03:00
|
|
|
/*
|
2024-02-13 17:59:27 +02:00
|
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
2023-07-27 08:31:52 +03:00
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
2022-02-28 17:07:03 +02:00
|
|
|
|
|
|
|
export class v1271580069531114 {
|
2021-11-11 19:02:25 +02:00
|
|
|
constructor() {
|
|
|
|
this.name = 'v1271580069531114';
|
|
|
|
}
|
|
|
|
async up(queryRunner) {
|
2020-01-29 21:37:25 +02:00
|
|
|
await queryRunner.query(`ALTER TABLE "antenna" ADD "users" character varying(1024) array NOT NULL DEFAULT '{}'::varchar[]`, undefined);
|
|
|
|
await queryRunner.query(`ALTER TABLE "antenna" ADD "caseSensitive" boolean NOT NULL DEFAULT false`, undefined);
|
|
|
|
await queryRunner.query(`ALTER TYPE "public"."antenna_src_enum" RENAME TO "antenna_src_enum_old"`, undefined);
|
|
|
|
await queryRunner.query(`CREATE TYPE "antenna_src_enum" AS ENUM('home', 'all', 'users', 'list')`, undefined);
|
|
|
|
await queryRunner.query(`ALTER TABLE "antenna" ALTER COLUMN "src" TYPE "antenna_src_enum" USING "src"::"text"::"antenna_src_enum"`, undefined);
|
|
|
|
await queryRunner.query(`DROP TYPE "antenna_src_enum_old"`, undefined);
|
|
|
|
}
|
2021-11-11 19:02:25 +02:00
|
|
|
async down(queryRunner) {
|
2020-01-29 21:37:25 +02:00
|
|
|
await queryRunner.query(`CREATE TYPE "antenna_src_enum_old" AS ENUM('home', 'all', 'list')`, undefined);
|
|
|
|
await queryRunner.query(`ALTER TABLE "antenna" ALTER COLUMN "src" TYPE "antenna_src_enum_old" USING "src"::"text"::"antenna_src_enum_old"`, undefined);
|
|
|
|
await queryRunner.query(`DROP TYPE "antenna_src_enum"`, undefined);
|
|
|
|
await queryRunner.query(`ALTER TYPE "antenna_src_enum_old" RENAME TO "antenna_src_enum"`, undefined);
|
|
|
|
await queryRunner.query(`ALTER TABLE "antenna" DROP COLUMN "caseSensitive"`, undefined);
|
|
|
|
await queryRunner.query(`ALTER TABLE "antenna" DROP COLUMN "users"`, undefined);
|
|
|
|
}
|
|
|
|
}
|