2021-09-05 13:53:46 +03:00
|
|
|
import { MigrationInterface, QueryRunner, TableColumn } from "typeorm";
|
|
|
|
|
|
|
|
export class AddExpiresAtToApiPermissions1630837386329 implements MigrationInterface {
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
|
|
await queryRunner.addColumns("api_permissions", [
|
|
|
|
new TableColumn({
|
|
|
|
name: "expires_at",
|
2021-09-05 16:42:35 +03:00
|
|
|
type: "datetime",
|
2021-09-05 13:53:46 +03:00
|
|
|
isNullable: true,
|
|
|
|
default: null,
|
|
|
|
}),
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
|
|
await queryRunner.dropColumn("api_permissions", "expires_at");
|
|
|
|
}
|
|
|
|
}
|