For #1140, I considered trying to use the existing fields in a better way, but because we already use the activations table to store preferences, we need to keep all of the existing data and its usage as-is. The enterprise code will use this new column to decide how long the trial period should be.pull/1157/head
parent
952544432e
commit
ba7b72b39a
@ -0,0 +1,18 @@
|
||||
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');
|
||||
}
|
||||
}
|
Loading…
Reference in new issue