diff --git a/db/migration/1710255240486-AddTypeAndSortToVariables.ts b/db/migration/1710255240486-AddTypeAndSortToVariables.ts new file mode 100644 index 00000000000..220953be5f2 --- /dev/null +++ b/db/migration/1710255240486-AddTypeAndSortToVariables.ts @@ -0,0 +1,19 @@ +import { MigrationInterface, QueryRunner } from "typeorm" + +export class AddTypeAndSortToVariables1710255240486 + implements MigrationInterface +{ + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE variables + ADD COLUMN type ENUM('float', 'int', 'mixed', 'string', 'ordinal') NULL, + ADD COLUMN sort JSON NULL` + ) + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE variables DROP COLUMN type, DROP COLUMN sort` + ) + } +}