1
0
Fork 1
mirror of https://example.com synced 2024-11-24 20:26:39 +09:00
firefish/packages/backend/migration/1603095701770-refine-abuse-user-report2.js

21 lines
1.2 KiB
JavaScript
Raw Normal View History

2021-11-12 02:02:25 +09:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class refineAbuseUserReport21603095701770 {
constructor() {
this.name = 'refineAbuseUserReport21603095701770';
}
async up(queryRunner) {
2020-10-19 19:29:04 +09:00
await queryRunner.query(`ALTER TABLE "abuse_user_report" ADD "targetUserHost" character varying(128)`);
await queryRunner.query(`ALTER TABLE "abuse_user_report" ADD "reporterHost" character varying(128)`);
await queryRunner.query(`CREATE INDEX "IDX_4ebbf7f93cdc10e8d1ef2fc6cd" ON "abuse_user_report" ("targetUserHost") `);
await queryRunner.query(`CREATE INDEX "IDX_f8d8b93740ad12c4ce8213a199" ON "abuse_user_report" ("reporterHost") `);
}
2021-11-12 02:02:25 +09:00
async down(queryRunner) {
2020-10-19 19:29:04 +09:00
await queryRunner.query(`DROP INDEX "IDX_f8d8b93740ad12c4ce8213a199"`);
await queryRunner.query(`DROP INDEX "IDX_4ebbf7f93cdc10e8d1ef2fc6cd"`);
await queryRunner.query(`ALTER TABLE "abuse_user_report" DROP COLUMN "reporterHost"`);
await queryRunner.query(`ALTER TABLE "abuse_user_report" DROP COLUMN "targetUserHost"`);
}
}
2021-11-12 02:02:25 +09:00
exports.refineAbuseUserReport21603095701770 = refineAbuseUserReport21603095701770;