From e633975df83927f1410179122d927f6f7eee0e7b Mon Sep 17 00:00:00 2001 From: slively Date: Fri, 18 Aug 2017 17:37:02 -0700 Subject: [PATCH] add seeds configuration to Knex client --- types/knex/index.d.ts | 5 +++++ types/knex/knex-tests.ts | 3 +++ 2 files changed, 8 insertions(+) diff --git a/types/knex/index.d.ts b/types/knex/index.d.ts index 3a76221bd4..5f7c4320a0 100644 --- a/types/knex/index.d.ts +++ b/types/knex/index.d.ts @@ -488,6 +488,7 @@ declare namespace Knex { MySqlConnectionConfig | MsSqlConnectionConfig | Sqlite3ConnectionConfig | SocketConnectionConfig; pool?: PoolConfig; migrations?: MigratorConfig; + seeds?: SeedsConfig; acquireConnectionTimeout?: number; useNullAsDefault?: boolean; searchPath?: string; @@ -620,6 +621,10 @@ declare namespace Knex { disableTransactions?: boolean; } + interface SeedsConfig { + directory?: string; + } + interface Migrator { make(name: string, config?: MigratorConfig): Promise; latest(config?: MigratorConfig): Promise; diff --git a/types/knex/knex-tests.ts b/types/knex/knex-tests.ts index 610f51cc1f..c3d2981d9c 100644 --- a/types/knex/knex-tests.ts +++ b/types/knex/knex-tests.ts @@ -127,6 +127,9 @@ var knex = Knex({ }, migrations: { tableName: 'migrations' + }, + seeds: { + directory: 'seeds' } });