mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-18 12:08:59 +08:00
Merge pull request #19144 from slively/master
add seeds configuration to Knex client
This commit is contained in:
5
types/knex/index.d.ts
vendored
5
types/knex/index.d.ts
vendored
@@ -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>;
|
||||
|
||||
@@ -127,6 +127,9 @@ var knex = Knex({
|
||||
},
|
||||
migrations: {
|
||||
tableName: 'migrations'
|
||||
},
|
||||
seeds: {
|
||||
directory: 'seeds'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user