Skip to content

apitabledefinitionchange

Troy Murray edited this page Sep 19, 2011 · 2 revisions

change()

Usage

Changes columns in the database based on the column definitions stored in this TableDefinition object created by the changeTable.

Function Syntax

t = changeTable(name);

// ... one or more column definitions here ...
t.change([addColumns]);

Parameters

Parameter Type Required Default Description
addColumns boolean No False if true, it will attempt to add new columns otherwise will check whether column exists to determine whether to add or update

Notes

If addColumns is set to true and the column already exists, your database will probably throw an error.

Examples

Clone this wiki locally