-
Notifications
You must be signed in to change notification settings - Fork 18
apimigrationexecute
Troy Murray edited this page Sep 19, 2011
·
3 revisions
Executes a raw sql query, generally used for database specific features.
execute(sql);| Parameter | Type | Required | Default | Description |
| sql | string | Yes | SQL statement to execute |
<cfcomponent extends="plugins.dbmigrate.Migration" hint="add composite primary key to tagging table">
<cffunction name="up">
<cfscript>
execute('ALTER TABLE mydb.taggings ADD PRIMARY KEY (tagid,callid);');
</cfscript>
</cffunction>
<cffunction name="down">
<cfscript>
execute('ALTER TABLE mydb.taggings DROP PRIMARY KEY');
</cfscript>
</cffunction>
</cfcomponent>