Skip to content

Commit

Permalink
✨ add type and sort columns to variables table
Browse files Browse the repository at this point in the history
  • Loading branch information
Marigold committed Mar 18, 2024
1 parent a8fd7ad commit 15a5225
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions db/migration/1710255240486-AddTypeAndSortToVariables.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { MigrationInterface, QueryRunner } from "typeorm"

export class AddTypeAndSortToVariables1710255240486
implements MigrationInterface
{
public async up(queryRunner: QueryRunner): Promise<void> {
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<void> {
await queryRunner.query(
`ALTER TABLE variables DROP COLUMN type, DROP COLUMN sort`
)
}
}

0 comments on commit 15a5225

Please sign in to comment.