Migrator
bigInteger()
Signature
Section titled “Signature”bigInteger() — returns any
Available in: tabledefinition
Category: Table Definition Functions
Description
Section titled “Description”Adds one or more big integer columns to a table definition in a migration. Use this when you need columns capable of storing large integer values, typically larger than standard integer columns.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
columnNames | string | no | — | |
limit | numeric | no | — | |
default | string | no | — | |
allowNull | boolean | no | — |
Examples
Section titled “Examples”1. Add a single big integer column
bigInteger(columnNames="userId");
2. Add multiple big integer columns
bigInteger(columnNames="orderId, invoiceId");
3. Add a column with a default value and disallow NULLs
bigInteger(columnNames="views", default="0", allowNull=false);
4. Add a column with a custom limit
bigInteger(columnNames="serialNumber", limit=20);