Skip to content

apimigrationchangetable

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

changeTable()

Usage

Creates a table definition object to apply multiple column definition changes to an existing table.

Function Syntax

t = changeTable(name);

Parameters

Parameter Type Required Default Description
name string Yes existing table name

Notes

Note that the table will not be modified in the database until you call the change function on the table definition object.

If a particular column name already exists in the table, the column definition will be changed, otherwise the column will be added.

If you only want to add or change a single column in the table, then it may be simpler to use either addColumn, changeColumn or renameColumn functions.

Examples

t = changeTable('members');
// ... add some column definition changes ...
t.change();
Clone this wiki locally