test: Fix failing tests on MySQL for Public API (#3520)

*  Generalize transformer

*  Use transformer

* 🧪 Fix expectations
This commit is contained in:
Iván Ovejero
2022-06-23 19:59:23 +02:00
committed by GitHub
parent 55bab19eb4
commit 3ee384fd87
4 changed files with 12 additions and 15 deletions

View File

@@ -22,6 +22,7 @@ import * as config from '../../../config';
import { DatabaseType, IWorkflowDb } from '../..';
import { TagEntity } from './TagEntity';
import { SharedWorkflow } from './SharedWorkflow';
import { objectRetriever } from '../utils/transformers';
function resolveDataType(dataType: string) {
const dbType = config.getEnv('database.type');
@@ -95,6 +96,7 @@ export class WorkflowEntity implements IWorkflowDb {
@Column({
type: resolveDataType('json') as ColumnOptions['type'],
nullable: true,
transformer: objectRetriever,
})
staticData?: IDataObject;