mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
19 lines
657 B
TypeScript
19 lines
657 B
TypeScript
|
import * as sqlUtils from "app/gen-server/sqlUtils";
|
||
|
import { MigrationInterface, QueryRunner, TableColumn } from "typeorm";
|
||
|
|
||
|
export class ActivationEnabled1722529827161 implements MigrationInterface {
|
||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||
|
const dbType = queryRunner.connection.driver.options.type;
|
||
|
const datetime = sqlUtils.datetime(dbType);
|
||
|
await queryRunner.addColumn('activations', new TableColumn({
|
||
|
name: 'enabled_at',
|
||
|
type: datetime,
|
||
|
isNullable: true,
|
||
|
}));
|
||
|
}
|
||
|
|
||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||
|
await queryRunner.dropColumn('activations', 'enabled_at');
|
||
|
}
|
||
|
}
|