Correct version requirements on postgres from 11 to 12 (#6863)

Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
This commit is contained in:
Oliver Sand
2021-08-18 11:19:25 +02:00
committed by GitHub
parent 4c31ff72d8
commit ee99798da7
4 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ well with ten thousands of indexed documents.
The connection to postgres is established via the database manager also used by
other plugins.
> **Important**: The search plugin requires at least Postgres 11!
> **Important**: The search plugin requires at least Postgres 12!
## Getting started
@@ -34,18 +34,18 @@ export class DatabaseDocumentStore implements DatabaseStore {
try {
const majorVersion = await queryPostgresMajorVersion(knex);
if (majorVersion < 11) {
if (majorVersion < 12) {
// We are using some features (like generated columns) that aren't
// available in older postgres versions.
throw new Error(
`The PgSearchEngine requires at least postgres version 11 (but is running on ${majorVersion})`,
`The PgSearchEngine requires at least postgres version 12 (but is running on ${majorVersion})`,
);
}
} catch {
// Actually both mysql and sqlite have a full text search, too. We could
// implement them separately or add them here.
throw new Error(
'The PgSearchEngine is only supported when using a postgres database (>=11.x)',
'The PgSearchEngine is only supported when using a postgres database (>=12.x)',
);
}
@@ -59,7 +59,7 @@ export class DatabaseDocumentStore implements DatabaseStore {
try {
const majorVersion = await queryPostgresMajorVersion(knex);
return majorVersion >= 11;
return majorVersion >= 12;
} catch {
return false;
}