Skip to content

Migrator

date()

date() — returns any

Available in: tabledefinition Category: Table Definition Functions

date() is a table definition function used in a migration CFC to add one or more DATE columns to a table.

NameTypeRequiredDefaultDescription
columnNamesstringno
defaultstringno
allowNullbooleanno
// In a migration CFC
t = createTable(name="events");
t.date(columnNames="startDate,endDate",  default="",  allowNull=false);
t.create();