mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
🚧 refactor mongoDB
This commit is contained in:
parent
3419d4b69f
commit
8d4feda7dd
|
@ -11,6 +11,8 @@ import {
|
||||||
} from '../../Interfaces';
|
} from '../../Interfaces';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
|
@Index(["webhookPath", "method"], { unique: true })
|
||||||
|
@Index(["webhookId", "method"], { unique: true })
|
||||||
export class WebhookEntity implements IWebhookDb {
|
export class WebhookEntity implements IWebhookDb {
|
||||||
|
|
||||||
@ObjectIdColumn()
|
@ObjectIdColumn()
|
||||||
|
@ -27,4 +29,7 @@ export class WebhookEntity implements IWebhookDb {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
node: string;
|
node: string;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
webhookId: string;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import {
|
||||||
|
|
||||||
import * as config from '../../../../config';
|
import * as config from '../../../../config';
|
||||||
|
|
||||||
export class CreateIndexStoppedAt1594910478695 implements MigrationInterface {
|
export default class CreateIndexStoppedAt1594910478695 implements MigrationInterface {
|
||||||
name = 'CreateIndexStoppedAt1594910478695';
|
name = 'CreateIndexStoppedAt1594910478695';
|
||||||
|
|
||||||
async up(queryRunner: MongoQueryRunner): Promise<void> {
|
async up(queryRunner: MongoQueryRunner): Promise<void> {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||||
|
|
||||||
export class InitialMigration1587563438936 implements MigrationInterface {
|
export default class InitialMigration1587563438936 implements MigrationInterface {
|
||||||
|
|
||||||
async up(queryRunner: QueryRunner): Promise<void> {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
MongoQueryRunner,
|
MongoQueryRunner,
|
||||||
} from 'typeorm/driver/mongodb/MongoQueryRunner';
|
} from 'typeorm/driver/mongodb/MongoQueryRunner';
|
||||||
|
|
||||||
export class WebhookModel1592679094242 implements MigrationInterface {
|
export default class WebhookModel1592679094242 implements MigrationInterface {
|
||||||
name = 'WebhookModel1592679094242';
|
name = 'WebhookModel1592679094242';
|
||||||
|
|
||||||
async up(queryRunner: MongoQueryRunner): Promise<void> {
|
async up(queryRunner: MongoQueryRunner): Promise<void> {
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
export * from './1587563438936-InitialMigration';
|
import InitialMigration1587563438936 from './1587563438936-InitialMigration';
|
||||||
export * from './1592679094242-WebhookModel';
|
import WebhookModel1592679094242 from './1592679094242-WebhookModel';
|
||||||
export * from './151594910478695-CreateIndexStoppedAt';
|
import CreateIndexStoppedAt1594910478695 from './151594910478695-CreateIndexStoppedAt';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
InitialMigration1587563438936,
|
||||||
|
WebhookModel1592679094242,
|
||||||
|
CreateIndexStoppedAt1594910478695,
|
||||||
|
]
|
||||||
|
|
Loading…
Reference in a new issue