My Secret Life as a Spaghetti Coder
home | about | contact | privacy statement
Model | View | Controller | Migration

cfrails.Migration
Component Migration

Creates tables / columns as defined by the derivative components

properties:
methods: create_table, down, drop_table, init, up


create_table
public create_table ( required string tableName, required struct columns, string orderedColumnsList="" )

Creates a table with the specified columns. It will automatically create an autonumber column called id for the primary key.

Output: supressed
Parameters:
   tableName: string, required, tableName - The name of the table to be created
   columns: struct, required, columns - A structure where the keys are the column names, and the values are their types.
   orderedColumnsList: string, optional, orderedColumnsList - A list of the columns' names in the order in which they should be created.

down
public down ( )

This method must be overridden by the derivative components, and it should be used to drop the table

Output: enabled

drop_table
public drop_table ( required string tableName )

Drops the specified table

Output: supressed
Parameters:
   tableName: string, required, tableName - The name of the table to be dropped

init
public init ( )

Initializes the newly created object of class Migration

Output: enabled

up
public up ( )

This method must be overridden by the derivative components, and it should be used to create the table

Output: enabled

Google
Web CodeOdor.com

Me
Picture of me

Topics
.NET (19)
AI/Machine Learning (14)
Answers To 100 Interview Questions (10)
Bioinformatics (2)
Business (1)
C and C++ (6)
cfrails (22)
ColdFusion (78)
Customer Relations (15)
Databases (3)
DRY (18)
DSLs (11)
Future Tech (5)
Games (5)
Groovy/Grails (8)
Hardware (1)
IDEs (9)
Java (38)
JavaScript (4)
Linux (2)
Lisp (1)
Mac OS (4)
Management (15)
MediaServerX (1)
Miscellany (76)
OOAD (37)
Productivity (11)
Programming (168)
Programming Quotables (9)
Rails (31)
Ruby (67)
Save Your Job (58)
scriptaGulous (4)
Software Development Process (23)
TDD (41)
TDDing xorblog (6)
Tools (5)
Web Development (8)
Windows (1)
With (1)
YAGNI (10)

Resources
Agile Manifesto & Principles
Principles Of OOD
ColdFusion
CFUnit
Ruby
Ruby on Rails
JUnit



RSS 2.0: Full Post | Short Blurb
Subscribe by email:

Delivered by FeedBurner