Migrator
time()
Signature
Section titled “Signature”time() — returns any
Available in: tabledefinition
Category: Table Definition Functions
Description
Section titled “Description”Adds one or more TIME columns to a table definition in a migration. Only available in a migrator CFC.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
columnNames | string | no | — | |
default | string | no | — | |
allowNull | boolean | no | — |
Examples
Section titled “Examples”1. Add a simple time column
t.time("startTime")
2. Add multiple time columns
t.time("opensAt, closesAt")
3. Add a time column with a default value
t.time(columnNames="reminderAt", default="09:00:00")
4. Add a nullable time column
t.time(columnNames="lunchBreak", allowNull=true)