Return to v2.1 docs

primaryKey()


Migrator Table Definition Functions any tabledefinition


Adds a primary key definition to the table. this method also allows for multiple primary keys.

Name Type Required Default Description
name string Yes
type string No integer
autoIncrement boolean No false
limit numeric No
precision numeric No
scale numeric No
references string No
onUpdate string No
onDelete string No

Related Functions

Table Definition Functions