2024-02-08 06:13:29 -08:00
|
|
|
import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm';
|
2024-08-27 07:44:32 -07:00
|
|
|
import { WithTimestamps, jsonColumnType } from './abstract-entity';
|
2023-09-06 03:23:40 -07:00
|
|
|
import { IConnections } from 'n8n-workflow';
|
|
|
|
import type { INode } from 'n8n-workflow';
|
2024-08-27 07:44:32 -07:00
|
|
|
import { WorkflowEntity } from './workflow-entity';
|
2023-09-06 03:23:40 -07:00
|
|
|
|
|
|
|
@Entity()
|
2023-09-27 07:22:39 -07:00
|
|
|
export class WorkflowHistory extends WithTimestamps {
|
2023-09-06 03:23:40 -07:00
|
|
|
@PrimaryColumn()
|
|
|
|
versionId: string;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
workflowId: string;
|
|
|
|
|
|
|
|
@Column(jsonColumnType)
|
|
|
|
nodes: INode[];
|
|
|
|
|
|
|
|
@Column(jsonColumnType)
|
|
|
|
connections: IConnections;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
authors: string;
|
|
|
|
|
|
|
|
@ManyToOne('WorkflowEntity', {
|
|
|
|
onDelete: 'CASCADE',
|
|
|
|
})
|
|
|
|
workflow: WorkflowEntity;
|
|
|
|
}
|