mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-07-25 22:30:51 +02:00
d3a1d3ffef
This reverts commit c21c8b3369.
22 lines
764 B
TypeScript
22 lines
764 B
TypeScript
import {
|
|
MigrationInterface,
|
|
QueryRunner,
|
|
} from 'typeorm';
|
|
|
|
import * as config from '../../../../config';
|
|
|
|
export class WebhookModel1592445003908 implements MigrationInterface {
|
|
name = 'WebhookModel1592445003908';
|
|
|
|
async up(queryRunner: QueryRunner): Promise<void> {
|
|
const tablePrefix = config.get('database.tablePrefix');
|
|
|
|
await queryRunner.query(`CREATE TABLE IF NOT EXISTS ${tablePrefix}webhook_entity ("workflowId" integer NOT NULL, "webhookPath" varchar NOT NULL, "method" varchar NOT NULL, "node" varchar NOT NULL, PRIMARY KEY ("webhookPath", "method"))`);
|
|
}
|
|
|
|
async down(queryRunner: QueryRunner): Promise<void> {
|
|
const tablePrefix = config.get('database.tablePrefix');
|
|
await queryRunner.query(`DROP TABLE ${tablePrefix}webhook_entity`);
|
|
}
|
|
}
|