1
0
Fork 0
mirror of synced 2024-09-12 23:43:09 +12:00

Fix test setup

This commit is contained in:
Adria Navarro 2024-05-13 10:28:35 +02:00
parent 1732feed27
commit 68e2313e6c

View file

@ -11,7 +11,7 @@ import {
TableSourceType, TableSourceType,
} from "@budibase/types" } from "@budibase/types"
import { breakExternalTableId, getNativeSql, SqlClient } from "../utils" import { breakExternalTableId, getNativeSql, SqlClient } from "../utils"
import { utils } from "@budibase/shared-core" import { helpers, utils } from "@budibase/shared-core"
import SchemaBuilder = Knex.SchemaBuilder import SchemaBuilder = Knex.SchemaBuilder
import CreateTableBuilder = Knex.CreateTableBuilder import CreateTableBuilder = Knex.CreateTableBuilder
@ -85,7 +85,12 @@ function generateSchema(
break break
case FieldType.ARRAY: case FieldType.ARRAY:
case FieldType.BB_REFERENCE: case FieldType.BB_REFERENCE:
schema.json(key) if (helpers.schema.isDeprecatedSingleUserColumn(column)) {
// This is still required for unit testing, in order to create "deprecated" schemas
schema.text(key)
} else {
schema.json(key)
}
break break
case FieldType.LINK: case FieldType.LINK:
// this side of the relationship doesn't need any SQL work // this side of the relationship doesn't need any SQL work