Skip to content

apimigrationaddrecord

Troy Murray edited this page Nov 1, 2011 · 4 revisions

addRecord()

Description

Generates SQL syntax to add a new record to an existing database table

Function Syntax

addRecord(table[[,columnName=columnValue\]\]\);

Parameters

Parameter Type Required Default Description
table string Yes Name of an existing table to add a new record to
column(s) string Yes List of columns and values to insert

Examples

addRecord(table='members',id=1,username='admin',password='#Hash("admin")#');

Limits

There is a maximum number of addRecord statements that can be used in a single migration. However, this limit is different depending on factors such as the application server hardware, database database server hardware, network connectivity between the two and timeout values that maybe set for all of these systems. The maximum tested addRecord statements in one migration to date was 2486 on a slow local development system. It's recommended to have no more then 2000 addRecord statements in a single migration file.

Clone this wiki locally