ColdFusion automatically creates tables when ORM is initialized for the application. For auto-generating tables, do the following:
In the THIS scope of Application.cfc, in ormsettings struct, set the dbCreate property to one of the following values:

  • update: Creates the table (if it does not exist) or updates the table (if it exists).
  • dropcreate: Drops the table if it exists and then creates it.
    For example,

<cfset this.ormsettings.dbCreate="update">

Certain specific attributes (DDL-only attributes) defined for the tags cfcomponent and cfproperty can be use to define various attributes for the auto-generated tables and columns. DDL-only attributes are used only for DDL generation. For details of these attributes, see the table in the section DDL-only attributes in Column.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy