From 76c122d1a44d2e81b513b40a332c45fb3bbd10ae Mon Sep 17 00:00:00 2001 From: nihiluis Date: Mon, 23 Oct 2017 21:56:04 +0200 Subject: [PATCH] add version property to Config for pg compatibility (#20584) --- types/knex/index.d.ts | 1 + types/knex/knex-tests.ts | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/types/knex/index.d.ts b/types/knex/index.d.ts index 71e3e0562a..6b09871f76 100644 --- a/types/knex/index.d.ts +++ b/types/knex/index.d.ts @@ -488,6 +488,7 @@ declare namespace Knex { debug?: boolean; client?: string; dialect?: string; + version?: string; connection?: string | ConnectionConfig | MariaSqlConnectionConfig | MySqlConnectionConfig | MsSqlConnectionConfig | Sqlite3ConnectionConfig | SocketConnectionConfig; pool?: PoolConfig; diff --git a/types/knex/knex-tests.ts b/types/knex/knex-tests.ts index 4c0ef8a209..de5414eac0 100644 --- a/types/knex/knex-tests.ts +++ b/types/knex/knex-tests.ts @@ -22,6 +22,20 @@ var knex = Knex({ } }); +var knex = Knex({ + debug: true, + client: 'pg', + version: '9.5', + connection: { + user : 'your_database_user', + password: 'your_database_password', + server : 'your_database_server', + options : { + database: 'myapp_test' + } + } +}); + var knex = Knex({ debug: true, client: 'mssql',