mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-26 07:57:17 +00:00
33 lines
858 B
TypeScript
33 lines
858 B
TypeScript
|
|
import { MigrationInterface, QueryRunner, TableColumn } from "typeorm";
|
||
|
|
|
||
|
|
export class AddAppCreateAndAppDeleteToGroupPermissions1634724636255
|
||
|
|
implements MigrationInterface
|
||
|
|
{
|
||
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
await queryRunner.addColumn(
|
||
|
|
"group_permissions",
|
||
|
|
new TableColumn({
|
||
|
|
name: "app_create",
|
||
|
|
type: "boolean",
|
||
|
|
default: false,
|
||
|
|
isNullable: false,
|
||
|
|
})
|
||
|
|
);
|
||
|
|
|
||
|
|
await queryRunner.addColumn(
|
||
|
|
"group_permissions",
|
||
|
|
new TableColumn({
|
||
|
|
name: "app_delete",
|
||
|
|
type: "boolean",
|
||
|
|
default: false,
|
||
|
|
isNullable: false,
|
||
|
|
})
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
await queryRunner.dropColumn("group_permissions", "app_create");
|
||
|
|
await queryRunner.dropColumn("group_permissions", "app_delete");
|
||
|
|
}
|
||
|
|
}
|