add version property to Config for pg compatibility (#20584)

This commit is contained in:
nihiluis
2017-10-23 21:56:04 +02:00
committed by Sheetal Nandi
parent 58206d9fd3
commit 76c122d1a4
2 changed files with 15 additions and 0 deletions

View File

@@ -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;

View File

@@ -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',