feat: Add workflow history repository files (no-changelog) (#7071)
This commit is contained in:
28
packages/cli/src/databases/entities/WorkflowHistory.ts
Normal file
28
packages/cli/src/databases/entities/WorkflowHistory.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Column, Entity, ManyToOne, PrimaryColumn } from 'typeorm';
|
||||
import { jsonColumnType } from './AbstractEntity';
|
||||
import { IConnections } from 'n8n-workflow';
|
||||
import type { INode } from 'n8n-workflow';
|
||||
import { WorkflowEntity } from './WorkflowEntity';
|
||||
|
||||
@Entity()
|
||||
export class WorkflowHistory {
|
||||
@PrimaryColumn()
|
||||
versionId: string;
|
||||
|
||||
@Column()
|
||||
workflowId: string;
|
||||
|
||||
@Column(jsonColumnType)
|
||||
nodes: INode[];
|
||||
|
||||
@Column(jsonColumnType)
|
||||
connections: IConnections;
|
||||
|
||||
@Column()
|
||||
authors: string;
|
||||
|
||||
@ManyToOne('WorkflowEntity', {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
workflow: WorkflowEntity;
|
||||
}
|
||||
@@ -19,6 +19,7 @@ import { WorkflowTagMapping } from './WorkflowTagMapping';
|
||||
import { WorkflowStatistics } from './WorkflowStatistics';
|
||||
import { ExecutionMetadata } from './ExecutionMetadata';
|
||||
import { ExecutionData } from './ExecutionData';
|
||||
import { WorkflowHistory } from './WorkflowHistory';
|
||||
|
||||
export const entities = {
|
||||
AuthIdentity,
|
||||
@@ -41,4 +42,5 @@ export const entities = {
|
||||
WorkflowStatistics,
|
||||
ExecutionMetadata,
|
||||
ExecutionData,
|
||||
WorkflowHistory,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user