mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-23 17:45:03 +00:00
add script
This commit is contained in:
parent
c84d1a0be1
commit
8e15da95d6
1 changed files with 21 additions and 0 deletions
|
@ -0,0 +1,21 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class ExpandCounterTriggerConditionFields1632560756499 implements MigrationInterface {
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<any> {
|
||||||
|
// INT(11) -> INT(32)
|
||||||
|
await queryRunner.query(`
|
||||||
|
ALTER TABLE \`counter_triggers\`
|
||||||
|
CHANGE COLUMN \`comparison_value\` \`comparison_value\` INT(32) NOT NULL AFTER \`comparison_op\`,
|
||||||
|
CHANGE COLUMN \`reverse_comparison_value\` \`reverse_comparison_value\` INT(32) NOT NULL AFTER \`reverse_comparison_op\`
|
||||||
|
`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<any> {
|
||||||
|
// INT(32) -> INT(11)
|
||||||
|
await queryRunner.query(`
|
||||||
|
ALTER TABLE \`counter_triggers\`
|
||||||
|
CHANGE COLUMN \`comparison_value\` \`comparison_value\` INT(11) NOT NULL AFTER \`comparison_op\`,
|
||||||
|
CHANGE COLUMN \`reverse_comparison_value\` \`reverse_comparison_value\` INT(11) NOT NULL AFTER \`reverse_comparison_op\`
|
||||||
|
`);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue