Skip to main content
Version: 4.4

Interface: TableBuilder#

knex.Knex.TableBuilder

Hierarchy#

Methods#

bigIncrements#

bigIncrements(columnName?: string): ColumnBuilder

Parameters:#

NameType
columnName?string

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1717


bigInteger#

bigInteger(columnName: string): ColumnBuilder

Parameters:#

NameType
columnNamestring

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1722


binary#

binary(columnName: string, length?: number): ColumnBuilder

Parameters:#

NameType
columnNamestring
length?number

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1751


boolean#

boolean(columnName: string): ColumnBuilder

Parameters:#

NameType
columnNamestring

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1740


comment#

comment(val: string): TableBuilder

Parameters:#

NameType
valstring

Returns: TableBuilder

Defined in: node_modules/knex/types/index.d.ts:1765


date#

date(columnName: string): ColumnBuilder

Parameters:#

NameType
columnNamestring

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1741


dateTime#

dateTime(columnName: string, options?: Readonly<{ precision?: undefined | number ; useTz?: undefined | boolean }>): ColumnBuilder

Parameters:#

NameType
columnNamestring
options?Readonly<{ precision?: undefined | number ; useTz?: undefined | boolean }>

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1742


decimal#

decimal(columnName: string, precision?: null | number, scale?: number): ColumnBuilder

Parameters:#

NameType
columnNamestring
precision?null | number
scale?number

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1735


double#

double(columnName: string, precision?: number, scale?: number): ColumnBuilder

Parameters:#

NameType
columnNamestring
precision?number
scale?number

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1730


dropColumn#

dropColumn(columnName: string): TableBuilder

Parameters:#

NameType
columnNamestring

Returns: TableBuilder

Defined in: node_modules/knex/types/index.d.ts:1718


dropColumns#

dropColumns(...columnNames: string[]): TableBuilder

Parameters:#

NameType
...columnNamesstring[]

Returns: TableBuilder

Defined in: node_modules/knex/types/index.d.ts:1719


dropForeign#

dropForeign(columnNames: readonly string[], foreignKeyName?: string): TableBuilder

Parameters:#

NameType
columnNamesreadonly string[]
foreignKeyName?string

Returns: TableBuilder

Defined in: node_modules/knex/types/index.d.ts:1779


dropIndex#

dropIndex(columnNames: string | readonly (string | Raw<any>)[], indexName?: string): TableBuilder

Parameters:#

NameType
columnNamesstring | readonly (string | Raw<any>)[]
indexName?string

Returns: TableBuilder

Defined in: node_modules/knex/types/index.d.ts:1782


dropPrimary#

dropPrimary(constraintName?: string): TableBuilder

Parameters:#

NameType
constraintName?string

Returns: TableBuilder

Defined in: node_modules/knex/types/index.d.ts:1781


dropTimestamps#

dropTimestamps(): ColumnBuilder

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1783


dropUnique#

dropUnique(columnNames: readonly (string | Raw<any>)[], indexName?: string): TableBuilder

Parameters:#

NameType
columnNamesreadonly (string | Raw<any>)[]
indexName?string

Returns: TableBuilder

Defined in: node_modules/knex/types/index.d.ts:1780


enu#

enu(columnName: string, values: readonly Value[], options?: EnumOptions): ColumnBuilder

Parameters:#

NameType
columnNamestring
valuesreadonly Value[]
options?EnumOptions

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1757


enum#

enum(columnName: string, values: readonly Value[], options?: EnumOptions): ColumnBuilder

Parameters:#

NameType
columnNamestring
valuesreadonly Value[]
options?EnumOptions

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1752


float#

float(columnName: string, precision?: number, scale?: number): ColumnBuilder

Parameters:#

NameType
columnNamestring
precision?number
scale?number

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1725


foreign#

foreign(column: string, foreignKeyName?: string): ForeignConstraintBuilder

Parameters:#

NameType
columnstring
foreignKeyName?string

Returns: ForeignConstraintBuilder

Defined in: node_modules/knex/types/index.d.ts:1774

foreign(columns: readonly string[], foreignKeyName?: string): MultikeyForeignConstraintBuilder

Parameters:#

NameType
columnsreadonly string[]
foreignKeyName?string

Returns: MultikeyForeignConstraintBuilder

Defined in: node_modules/knex/types/index.d.ts:1775


increments#

increments(columnName?: string): ColumnBuilder

Parameters:#

NameType
columnName?string

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1716


index#

index(columnNames: string | readonly (string | Raw<any>)[], indexName?: string, indexType?: string): TableBuilder

Parameters:#

NameType
columnNamesstring | readonly (string | Raw<any>)[]
indexName?string
indexType?string

Returns: TableBuilder

Defined in: node_modules/knex/types/index.d.ts:1768


integer#

integer(columnName: string, length?: number): ColumnBuilder

Parameters:#

NameType
columnNamestring
length?number

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1721


json#

json(columnName: string): ColumnBuilder

Parameters:#

NameType
columnNamestring

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1762


jsonb#

jsonb(columnName: string): ColumnBuilder

Parameters:#

NameType
columnNamestring

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1763


primary#

primary(columnNames: readonly string[], constraintName?: string): TableBuilder

Parameters:#

NameType
columnNamesreadonly string[]
constraintName?string

Returns: TableBuilder

Defined in: node_modules/knex/types/index.d.ts:1767


queryContext#

queryContext(context: any): TableBuilder

Parameters:#

NameType
contextany

Returns: TableBuilder

Defined in: node_modules/knex/types/index.d.ts:1784


renameColumn#

renameColumn(from: string, to: string): ColumnBuilder

Parameters:#

NameType
fromstring
tostring

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1720


specificType#

specificType(columnName: string, type: string): ColumnBuilder

Parameters:#

NameType
columnNamestring
typestring

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1766


string#

string(columnName: string, length?: number): ColumnBuilder

Parameters:#

NameType
columnNamestring
length?number

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1724


text#

text(columnName: string, textType?: string): ColumnBuilder

Parameters:#

NameType
columnNamestring
textType?string

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1723


time#

time(columnName: string): ColumnBuilder

Parameters:#

NameType
columnNamestring

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1743


timestamp#

timestamp(columnName: string, options?: Readonly<{ precision?: undefined | number ; useTz?: undefined | boolean }>): ColumnBuilder

Parameters:#

NameType
columnNamestring
options?Readonly<{ precision?: undefined | number ; useTz?: undefined | boolean }>

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1744

timestamp(columnName: string, withoutTz?: boolean, precision?: number): ColumnBuilder

deprecated

Parameters:#

NameType
columnNamestring
withoutTz?boolean
precision?number

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1746


timestamps#

timestamps(useTimestampType?: boolean, makeDefaultNow?: boolean): ColumnBuilder

Parameters:#

NameType
useTimestampType?boolean
makeDefaultNow?boolean

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1747


unique#

unique(columnNames: readonly (string | Raw<any>)[], indexName?: string): TableBuilder

Parameters:#

NameType
columnNamesreadonly (string | Raw<any>)[]
indexName?string

Returns: TableBuilder

Defined in: node_modules/knex/types/index.d.ts:1773


uuid#

uuid(columnName: string): ColumnBuilder

Parameters:#

NameType
columnNamestring

Returns: ColumnBuilder

Defined in: node_modules/knex/types/index.d.ts:1764

Last updated on by renovate[bot]