Updating CI and adding postgres legacy to test suite fully. Also fixing a schema export issue.
This commit is contained in:
parent
340d9c34ff
commit
07c24c16a4
|
@ -190,6 +190,8 @@ jobs:
|
|||
docker pull mariadb@${{ steps.dotenv.outputs.MARIADB_SHA }}
|
||||
elif [ "${{ matrix.datasource }}" == "oracle" ]; then
|
||||
docker pull budibase/oracle-database:23.2-slim-faststart
|
||||
elif [ "${{ matrix.datasource }}" == "postgres_legacy" ]; then
|
||||
docker pull postgres:9.5.25
|
||||
fi
|
||||
docker pull minio/minio &
|
||||
docker pull redis &
|
||||
|
|
|
@ -590,13 +590,13 @@ if (descriptions.length) {
|
|||
}
|
||||
|
||||
const datasources = datasourceDescribe({
|
||||
exclude: [DatabaseName.MONGODB, DatabaseName.SQS, DatabaseName.ORACLE],
|
||||
only: [DatabaseName.POSTGRES_LEGACY],
|
||||
})
|
||||
|
||||
if (datasources.length) {
|
||||
describe.each(datasources)(
|
||||
"$dbName",
|
||||
({ config, dsProvider, isPostgres, isMySQL, isMariaDB }) => {
|
||||
({ config, dsProvider, isPostgres, isLegacy, isMySQL, isMariaDB }) => {
|
||||
let datasource: Datasource
|
||||
let client: Knex
|
||||
|
||||
|
@ -647,6 +647,13 @@ if (datasources.length) {
|
|||
// can load it. We're using postgres 16 in tests at the time of writing.
|
||||
schema = schema.replace("SET transaction_timeout = 0;", "")
|
||||
}
|
||||
if (isPostgres && isLegacy) {
|
||||
// in older versions of Postgres, this is not a valid option - Postgres 9.5 does not support this.
|
||||
schema = schema.replace(
|
||||
"SET idle_in_transaction_session_timeout = 0;",
|
||||
""
|
||||
)
|
||||
}
|
||||
|
||||
await config.api.table.destroy(table._id!, table._rev!)
|
||||
|
||||
|
|
|
@ -147,7 +147,11 @@ export function datasourceDescribe(opts: DatasourceDescribeOpts) {
|
|||
DatabaseName.ORACLE,
|
||||
].includes(dbName),
|
||||
isMySQL: dbName === DatabaseName.MYSQL,
|
||||
isPostgres: dbName === DatabaseName.POSTGRES,
|
||||
isPostgres:
|
||||
dbName === DatabaseName.POSTGRES ||
|
||||
dbName === DatabaseName.POSTGRES_LEGACY,
|
||||
// check if any of the legacy tags
|
||||
isLegacy: dbName === DatabaseName.POSTGRES_LEGACY,
|
||||
isMongodb: dbName === DatabaseName.MONGODB,
|
||||
isMSSQL: dbName === DatabaseName.SQL_SERVER,
|
||||
isOracle: dbName === DatabaseName.ORACLE,
|
||||
|
|
Loading…
Reference in New Issue