mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-12 23:54:07 -08:00
⚡ Fix indentation
This commit is contained in:
parent
5ed86670a8
commit
17ee152eaf
|
@ -7,7 +7,7 @@ import {
|
||||||
IWorkflowDb,
|
IWorkflowDb,
|
||||||
NodeTypes,
|
NodeTypes,
|
||||||
WebhookHelpers,
|
WebhookHelpers,
|
||||||
} from '../../..';
|
} from '../../..';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Workflow,
|
Workflow,
|
||||||
|
@ -15,21 +15,21 @@ import {
|
||||||
|
|
||||||
import {
|
import {
|
||||||
IWebhookDb,
|
IWebhookDb,
|
||||||
} from '../../../Interfaces';
|
} from '../../../Interfaces';
|
||||||
|
|
||||||
import * as config from '../../../../config';
|
import * as config from '../../../../config';
|
||||||
|
|
||||||
export class WebhookModel1589476000887 implements MigrationInterface {
|
export class WebhookModel1589476000887 implements MigrationInterface {
|
||||||
name = 'WebhookModel1589476000887';
|
name = 'WebhookModel1589476000887';
|
||||||
|
|
||||||
async up(queryRunner: QueryRunner): Promise<void> {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
let tablePrefix = config.get('database.tablePrefix');
|
let tablePrefix = config.get('database.tablePrefix');
|
||||||
const schema = config.get('database.postgresdb.schema');
|
const schema = config.get('database.postgresdb.schema');
|
||||||
if (schema) {
|
if (schema) {
|
||||||
tablePrefix = schema + '.' + tablePrefix;
|
tablePrefix = schema + '.' + tablePrefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
await queryRunner.query(`CREATE TABLE ${tablePrefix}webhook_entity ("workflowId" integer NOT NULL, "webhookPath" character varying NOT NULL, "method" character varying NOT NULL, "node" character varying NOT NULL, CONSTRAINT "PK_b21ace2e13596ccd87dc9bf4ea6" PRIMARY KEY ("webhookPath", "method"))`, undefined);
|
await queryRunner.query(`CREATE TABLE ${tablePrefix}webhook_entity ("workflowId" integer NOT NULL, "webhookPath" character varying NOT NULL, "method" character varying NOT NULL, "node" character varying NOT NULL, CONSTRAINT "PK_b21ace2e13596ccd87dc9bf4ea6" PRIMARY KEY ("webhookPath", "method"))`, undefined);
|
||||||
|
|
||||||
const workflows = await queryRunner.query(`SELECT * FROM ${tablePrefix}workflow_entity WHERE active=true`) as IWorkflowDb[];
|
const workflows = await queryRunner.query(`SELECT * FROM ${tablePrefix}workflow_entity WHERE active=true`) as IWorkflowDb[];
|
||||||
const data: IWebhookDb[] = [];
|
const data: IWebhookDb[] = [];
|
||||||
|
@ -61,13 +61,13 @@ export class WebhookModel1589476000887 implements MigrationInterface {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async down(queryRunner: QueryRunner): Promise<void> {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
let tablePrefix = config.get('database.tablePrefix');
|
let tablePrefix = config.get('database.tablePrefix');
|
||||||
const schema = config.get('database.postgresdb.schema');
|
const schema = config.get('database.postgresdb.schema');
|
||||||
if (schema) {
|
if (schema) {
|
||||||
tablePrefix = schema + '.' + tablePrefix;
|
tablePrefix = schema + '.' + tablePrefix;
|
||||||
}
|
}
|
||||||
await queryRunner.query(`DROP TABLE ${tablePrefix}webhook_entity`, undefined);
|
await queryRunner.query(`DROP TABLE ${tablePrefix}webhook_entity`, undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue