mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
Added tests, fixed errant import and foreign return type
This commit is contained in:
Vendored
+1
-2
@@ -13,7 +13,6 @@
|
||||
import events = require("events");
|
||||
import stream = require ("stream");
|
||||
import Bluebird = require("bluebird");
|
||||
import { ColumnBuilder } from "knex";
|
||||
|
||||
type Callback = Function;
|
||||
type Client = Function;
|
||||
@@ -441,7 +440,7 @@ declare namespace Knex {
|
||||
index(columnNames: (string | Raw)[], indexName?: string, indexType?: string): TableBuilder;
|
||||
unique(columnNames: (string | Raw)[], indexName?: string): TableBuilder;
|
||||
foreign(column: string, foreignKeyName?: string): ForeignConstraintBuilder;
|
||||
foreign(columns: string[], foreignKeyName?: string): ForeignConstraintBuilder;
|
||||
foreign(columns: string[], foreignKeyName?: string): MultikeyForeignConstraintBuilder;
|
||||
dropForeign(columnNames: string[], foreignKeyName?: string): TableBuilder;
|
||||
dropUnique(columnNames: (string | Raw)[], indexName?: string): TableBuilder;
|
||||
dropPrimary(constraintName?: string): TableBuilder;
|
||||
|
||||
@@ -1039,6 +1039,10 @@ knex.schema
|
||||
.dropTableIfExists('A')
|
||||
.createTable('A', table => {
|
||||
table.integer('C').unsigned().references('B.id').notNullable();
|
||||
table.integer('D').primary('PK').notNullable();
|
||||
table.string('E').unique('UX').nullable();
|
||||
table.foreign('E', 'FK').references('F.id');
|
||||
table.timestamp('T', false).notNullable();
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user