Merge pull request #19144 from slively/master

add seeds configuration to Knex client
This commit is contained in:
Bowden Kelly
2017-08-24 18:00:25 -07:00
committed by GitHub
2 changed files with 8 additions and 0 deletions

View File

@@ -490,6 +490,7 @@ declare namespace Knex {
MySqlConnectionConfig | MsSqlConnectionConfig | Sqlite3ConnectionConfig | SocketConnectionConfig;
pool?: PoolConfig;
migrations?: MigratorConfig;
seeds?: SeedsConfig;
acquireConnectionTimeout?: number;
useNullAsDefault?: boolean;
searchPath?: string;
@@ -622,6 +623,10 @@ declare namespace Knex {
disableTransactions?: boolean;
}
interface SeedsConfig {
directory?: string;
}
interface Migrator {
make(name: string, config?: MigratorConfig): Promise<string>;
latest(config?: MigratorConfig): Promise<any>;

View File

@@ -127,6 +127,9 @@ var knex = Knex({
},
migrations: {
tableName: 'migrations'
},
seeds: {
directory: 'seeds'
}
});