TableDefinition

A TableDefinition lets you define the components of a database table.

TableDefinition.swift:73
final class TableDefinition

See the documentation of the Database create(table:options:body:) method for usage information:

try db.create(table: "player") { t in // t is TableDefinition
    t.autoIncrementedPrimaryKey("id")
    t.column("name", .text).notNull()
}

Define Columns

Define the Primary Key

Define a Foreign Key

Define a Unique Key

Define Others Constraints