feat(backend): add isSensitive to Channel

This commit is contained in:
anatawa12 2023-07-31 15:03:38 +09:00
parent b6790a4320
commit aacde76f43
No known key found for this signature in database
GPG Key ID: 9CA909848B8E4EA6
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,12 @@
export class SensitiveChannel1690782653311 {
name = 'SensitiveChannel1690782653311'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "channel"
ADD "isSensitive" boolean NOT NULL DEFAULT false`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "channel" DROP COLUMN "isSensitive"`);
}
}

View File

@ -89,4 +89,9 @@ export class Channel {
comment: 'The count of users.',
})
public usersCount: number;
@Column('boolean', {
default: false,
})
public isSensitive: boolean;
}