14 lines
650 B
TypeScript
14 lines
650 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
export class AddFieldIsAdminVisibledTableAuthRole1762165716863 implements MigrationInterface {
|
|
name = 'AddFieldIsAdminVisibledTableAuthRole1762165716863'
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE \`authRole\` ADD \`isAdminVisibled\` tinyint NULL COMMENT 'ข้อมูลที่ role admin สามารถเห็นได้'`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE \`authRole\` DROP COLUMN \`isAdminVisibled\``);
|
|
}
|
|
|
|
}
|