Fix test setup
This commit is contained in:
parent
1732feed27
commit
68e2313e6c
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue