Merge pull request #479 from automatisch/feature/add-error-details-column

feat: Add error details jsonb column to execution steps
This commit is contained in:
Ömer Faruk Aydın
2022-09-04 19:17:45 +03:00
committed by GitHub
2 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import { Knex } from 'knex';
export async function up(knex: Knex): Promise<void> {
return knex.schema.table('execution_steps', (table) => {
table.jsonb('error_details');
});
}
export async function down(knex: Knex): Promise<void> {
return knex.schema.table('execution_steps', (table) => {
table.dropColumn('error_details');
});
}

View File

@@ -10,6 +10,7 @@ class ExecutionStep extends Base {
stepId!: string;
dataIn!: Record<string, unknown>;
dataOut!: Record<string, unknown>;
errorDetails: Record<string, unknown>;
status = 'failure';
step: Step;
@@ -25,6 +26,7 @@ class ExecutionStep extends Base {
dataIn: { type: 'object' },
dataOut: { type: 'object' },
status: { type: 'string', enum: ['success', 'failure'] },
errorDetails: { type: ['object', 'null'] },
},
};