Skip to main content
Version: 6.4

MySqlTableBuilder

Hierarchy

  • TableBuilder
    • MySqlTableBuilder

Index

Methods

bigIncrements

  • Parameters

    Returns ColumnBuilder

inheritedbigint

  • bigint(columnName: string): ColumnBuilder
  • Parameters

    • columnName: string

    Returns ColumnBuilder

inheritedbigInteger

  • bigInteger(columnName: string): ColumnBuilder
  • Parameters

    • columnName: string

    Returns ColumnBuilder

inheritedbinary

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

    • columnName: string
    • optionallength: number

    Returns ColumnBuilder

inheritedboolean

  • boolean(columnName: string): ColumnBuilder
  • Parameters

    • columnName: string

    Returns ColumnBuilder

inheritedcheck

  • check(checkPredicate: string, bindings?: Record<string, any>, constraintName?: string): TableBuilder
  • Parameters

    • checkPredicate: string
    • optionalbindings: Record<string, any>
    • optionalconstraintName: string

    Returns TableBuilder

inheritedcomment

  • comment(val: string): void
  • Parameters

    • val: string

    Returns void

inheriteddate

  • date(columnName: string): ColumnBuilder
  • Parameters

    • columnName: string

    Returns ColumnBuilder

inheriteddatetime

  • datetime(columnName: string, options?: Readonly<{ precision?: number; useTz?: boolean }>): ColumnBuilder
  • Parameters

    • columnName: string
    • optionaloptions: Readonly<{ precision?: number; useTz?: boolean }>

    Returns ColumnBuilder

inheriteddateTime

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

    • columnName: string
    • optionaloptions: Readonly<{ precision?: number; useTz?: boolean }>

    Returns ColumnBuilder

inheriteddecimal

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

    • columnName: string
    • optionalprecision: null | number
    • optionalscale: number

    Returns ColumnBuilder

inheriteddouble

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

    • columnName: string
    • optionalprecision: number
    • optionalscale: number

    Returns ColumnBuilder

inheriteddropChecks

  • dropChecks(checkConstraintNames: string | string[]): TableBuilder
  • Parameters

    • checkConstraintNames: string | string[]

    Returns TableBuilder

inheriteddropColumn

  • dropColumn(columnName: string): TableBuilder
  • Parameters

    • columnName: string

    Returns TableBuilder

inheriteddropColumns

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

    • rest...columnNames: string[]

    Returns TableBuilder

inheriteddropForeign

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

    • columnNames: string | readonly string[]
    • optionalforeignKeyName: string

    Returns TableBuilder

inheriteddropIndex

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

    • columnNames: string | readonly (string | Raw<any>)[]
    • optionalindexName: string

    Returns TableBuilder

inheriteddropNullable

  • dropNullable(column: string): TableBuilder
  • Parameters

    • column: string

    Returns TableBuilder

inheriteddropPrimary

  • dropPrimary(constraintName?: string): TableBuilder
  • Parameters

    • optionalconstraintName: string

    Returns TableBuilder

inheriteddropTimestamps

  • dropTimestamps(useCamelCase?: boolean): TableBuilder
  • Parameters

    • optionaluseCamelCase: boolean

    Returns TableBuilder

inheriteddropUnique

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

    • columnNames: readonly (string | Raw<any>)[]
    • optionalindexName: string

    Returns TableBuilder

inheritedenu

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

    • columnName: string
    • values: null | readonly Value[]
    • optionaloptions: EnumOptions

    Returns ColumnBuilder

inheritedenum

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

    • columnName: string
    • values: null | readonly Value[]
    • optionaloptions: EnumOptions

    Returns ColumnBuilder

inheritedfloat

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

    • columnName: string
    • optionalprecision: number
    • optionalscale: number

    Returns ColumnBuilder

inheritedforeign

  • foreign(column: string, foreignKeyName?: string): ForeignConstraintBuilder
  • foreign(columns: readonly string[], foreignKeyName?: string): MultikeyForeignConstraintBuilder
  • Parameters

    • column: string
    • optionalforeignKeyName: string

    Returns ForeignConstraintBuilder

inheritedgeography

  • geography(columnName: string): ColumnBuilder
  • Parameters

    • columnName: string

    Returns ColumnBuilder

inheritedgeometry

  • geometry(columnName: string): ColumnBuilder
  • Parameters

    • columnName: string

    Returns ColumnBuilder

increments

  • Parameters

    Returns ColumnBuilder

inheritedindex

  • index(columnNames: string | readonly (string | Raw<any>)[], indexName?: string, indexType?: string): TableBuilder
  • index(columnNames: string | readonly (string | Raw<any>)[], indexName?: string, options?: Readonly<{ indexType?: string; predicate?: QueryBuilder<any, any>; storageEngineIndexType?: storageEngineIndexType }>): TableBuilder
  • Parameters

    • columnNames: string | readonly (string | Raw<any>)[]
    • optionalindexName: string
    • optionalindexType: string

    Returns TableBuilder

inheritedinteger

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

    • columnName: string
    • optionallength: number

    Returns ColumnBuilder

inheritedjson

  • json(columnName: string): ColumnBuilder
  • Parameters

    • columnName: string

    Returns ColumnBuilder

inheritedjsonb

  • jsonb(columnName: string): ColumnBuilder
  • Parameters

    • columnName: string

    Returns ColumnBuilder

inheritedmediumint

  • mediumint(columnName: string): ColumnBuilder
  • Parameters

    • columnName: string

    Returns ColumnBuilder

inheritedpoint

  • point(columnName: string): ColumnBuilder
  • Parameters

    • columnName: string

    Returns ColumnBuilder

inheritedprimary

  • primary(columnNames: readonly string[], options?: Readonly<{ constraintName?: string; deferrable?: deferrableType }>): TableBuilder
  • primary(columnNames: readonly string[], constraintName?: string): TableBuilder
  • Parameters

    • columnNames: readonly string[]
    • optionaloptions: Readonly<{ constraintName?: string; deferrable?: deferrableType }>

    Returns TableBuilder

inheritedqueryContext

  • queryContext(context: any): TableBuilder
  • Parameters

    • context: any

    Returns TableBuilder

inheritedrenameColumn

  • renameColumn(from: string, to: string): TableBuilder
  • Parameters

    • from: string
    • to: string

    Returns TableBuilder

inheritedsetNullable

  • setNullable(column: string): TableBuilder
  • Parameters

    • column: string

    Returns TableBuilder

inheritedsmallint

  • smallint(columnName: string): ColumnBuilder
  • Parameters

    • columnName: string

    Returns ColumnBuilder

inheritedspecificType

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

    • columnName: string
    • type: string

    Returns ColumnBuilder

inheritedstring

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

    • columnName: string
    • optionallength: number

    Returns ColumnBuilder

inheritedtext

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

    • columnName: string
    • optionaltextType: string

    Returns ColumnBuilder

inheritedtime

  • time(columnName: string): ColumnBuilder
  • Parameters

    • columnName: string

    Returns ColumnBuilder

inheritedtimestamp

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

    • columnName: string
    • optionaloptions: Readonly<{ precision?: number; useTz?: boolean }>

    Returns ColumnBuilder

inheritedtimestamps

  • timestamps(useTimestamps?: boolean, defaultToNow?: boolean, useCamelCase?: boolean): ColumnBuilder
  • timestamps(options?: Readonly<{ defaultToNow?: boolean; useCamelCase?: boolean; useTimestamps?: boolean }>): void
  • Parameters

    • optionaluseTimestamps: boolean
    • optionaldefaultToNow: boolean
    • optionaluseCamelCase: boolean

    Returns ColumnBuilder

inheritedtinyint

  • tinyint(columnName: string, length?: number): ColumnBuilder
  • Parameters

    • columnName: string
    • optionallength: number

    Returns ColumnBuilder

inheritedunique

  • unique(columnNames: string | readonly (string | Raw<any>)[], options?: Readonly<{ deferrable?: deferrableType; indexName?: string; predicate?: QueryBuilder<any, any>; storageEngineIndexType?: string; useConstraint?: boolean }>): TableBuilder
  • unique(columnNames: string | readonly (string | Raw<any>)[], indexName?: string): TableBuilder
  • Parameters

    • columnNames: string | readonly (string | Raw<any>)[]
    • optionaloptions: Readonly<{ deferrable?: deferrableType; indexName?: string; predicate?: QueryBuilder<any, any>; storageEngineIndexType?: string; useConstraint?: boolean }>

    Returns TableBuilder

inheriteduuid

  • uuid(columnName: string, options?: Readonly<{ primaryKey?: boolean; useBinaryUuid?: boolean }>): ColumnBuilder
  • Parameters

    • columnName: string
    • optionaloptions: Readonly<{ primaryKey?: boolean; useBinaryUuid?: boolean }>

    Returns ColumnBuilder