Merge pull request #13519 from Budibase/budi-8179/mssql-schema-conflicts
MSSQL schema conflicts
This commit is contained in:
commit
5124ee3ce1
|
@ -4,6 +4,7 @@ services:
|
||||||
# user: sa
|
# user: sa
|
||||||
# database: master
|
# database: master
|
||||||
mssql:
|
mssql:
|
||||||
|
# platform: linux/amd64
|
||||||
image: bb/mssql
|
image: bb/mssql
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
|
|
@ -472,14 +472,13 @@ class InternalBuilder {
|
||||||
): Knex.QueryBuilder {
|
): Knex.QueryBuilder {
|
||||||
const tableName = endpoint.entityId
|
const tableName = endpoint.entityId
|
||||||
const tableAlias = aliases?.[tableName]
|
const tableAlias = aliases?.[tableName]
|
||||||
let table: string | Record<string, string> = tableName
|
|
||||||
if (tableAlias) {
|
const query = knex(
|
||||||
table = { [tableAlias]: tableName }
|
this.tableNameWithSchema(tableName, {
|
||||||
}
|
alias: tableAlias,
|
||||||
let query = knex(table)
|
schema: endpoint.schema,
|
||||||
if (endpoint.schema) {
|
})
|
||||||
query = query.withSchema(endpoint.schema)
|
)
|
||||||
}
|
|
||||||
return query
|
return query
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue