Skip to main content
Version: 4.5

Class: DatabaseSchema#

knex.DatabaseSchema

Constructors#

constructor#

+ new DatabaseSchema(): DatabaseSchema

Returns: DatabaseSchema

Properties#

tables#

Private Readonly tables: DatabaseTable[]

Defined in: packages/knex/src/schema/DatabaseSchema.ts:9

Methods#

addTable#

addTable(name: string, schema: undefined | null | string): DatabaseTable

Parameters:#

NameType
namestring
schemaundefined | null | string

Returns: DatabaseTable

Defined in: packages/knex/src/schema/DatabaseSchema.ts:11


getTable#

getTable(name: string): undefined | DatabaseTable

Parameters:#

NameType
namestring

Returns: undefined | DatabaseTable

Defined in: packages/knex/src/schema/DatabaseSchema.ts:22


getTables#

getTables(): DatabaseTable[]

Returns: DatabaseTable[]

Defined in: packages/knex/src/schema/DatabaseSchema.ts:18


create#

Staticcreate(connection: AbstractSqlConnection, helper: SchemaHelper, config: Configuration<IDatabaseDriver<Connection>>): Promise<DatabaseSchema>

Parameters:#

NameType
connectionAbstractSqlConnection
helperSchemaHelper
configConfiguration<IDatabaseDriver<Connection>>

Returns: Promise<DatabaseSchema>

Defined in: packages/knex/src/schema/DatabaseSchema.ts:26

Last updated on by Renovate Bot