fix(core): Change WorkflowHistory nodes/connections columns to be json (#7282)
Github issue / Community forum post (link here to close automatically):
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import type { MigrationContext, ReversibleMigration } from '@db/types';
|
||||
|
||||
const tableName = 'workflow_history';
|
||||
|
||||
export class ModifyWorkflowHistoryNodesAndConnections1695829275184 implements ReversibleMigration {
|
||||
async up({ schemaBuilder: { addColumns, dropColumns, column } }: MigrationContext) {
|
||||
await dropColumns(tableName, ['nodes', 'connections']);
|
||||
await addColumns(tableName, [column('nodes').json.notNull, column('connections').json.notNull]);
|
||||
}
|
||||
|
||||
async down({ schemaBuilder: { dropColumns, addColumns, column } }: MigrationContext) {
|
||||
await dropColumns(tableName, ['nodes', 'connections']);
|
||||
await addColumns(tableName, [column('nodes').text.notNull, column('connections').text.notNull]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user