mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-07-31 09:07:25 +02:00
15 lines
591 B
TypeScript
15 lines
591 B
TypeScript
import type { MigrationContext, ReversibleMigration } from '@db/types';
|
|
|
|
export class AddTriggerCountColumn1669823906995 implements ReversibleMigration {
|
|
async up({ queryRunner, tablePrefix }: MigrationContext) {
|
|
await queryRunner.query(
|
|
`ALTER TABLE ${tablePrefix}workflow_entity ADD COLUMN "triggerCount" integer NOT NULL DEFAULT 0`,
|
|
);
|
|
// Table will be populated by n8n startup - see ActiveWorkflowRunner.ts
|
|
}
|
|
|
|
async down({ queryRunner, tablePrefix }: MigrationContext) {
|
|
await queryRunner.query(`ALTER TABLE ${tablePrefix}workflow_entity DROP COLUMN "triggerCount"`);
|
|
}
|
|
}
|