mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
29 lines
633 B
TypeScript
29 lines
633 B
TypeScript
import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm';
|
|
import { WithTimestamps, jsonColumnType } from './abstract-entity';
|
|
import { IConnections } from 'n8n-workflow';
|
|
import type { INode } from 'n8n-workflow';
|
|
import { WorkflowEntity } from './workflow-entity';
|
|
|
|
@Entity()
|
|
export class WorkflowHistory extends WithTimestamps {
|
|
@PrimaryColumn()
|
|
versionId: string;
|
|
|
|
@Column()
|
|
workflowId: string;
|
|
|
|
@Column(jsonColumnType)
|
|
nodes: INode[];
|
|
|
|
@Column(jsonColumnType)
|
|
connections: IConnections;
|
|
|
|
@Column()
|
|
authors: string;
|
|
|
|
@ManyToOne('WorkflowEntity', {
|
|
onDelete: 'CASCADE',
|
|
})
|
|
workflow: WorkflowEntity;
|
|
}
|