Eric, I'm interested in seeing it. Let us know if and where you are releasing it. --Ryan
________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric O'Connell Sent: Friday, July 13, 2007 11:29 AM To: cfcdev@cfczone.org Subject: [CFCDEV] "Rails-Style" Migrations (for fun and profit?) Hi folks, I started to get anxious about keeping my developer and production database schemas in sync, so I decided to implement a rails-style migration functionality. I'd already implemented about 90% of it when I came across cf_rails, but I thought I'd show it off anyway. Like cf_rails, it is currently mssql-only, but a connection adaptor layer could be added fairly easily. Anyway, here's what the migration syntax looks like: <cf_create_table tableName="foo" force="true"> <cf_column name="bar" type="varchar"> <cf_column name="baaz" type="integer"> </cf_create_table> <cf_add_column tableName="foo" name="quux" type="datetime"> <cf_remove_column tableName="foo" name="baaz"> <cf_drop_table tableName="foo"> And here is an actual migration script: <cfcomponent extends="com.iba.migration.instance" output="yes"> <cffunction name="up" returnType="void" output="no" access="remote"> <cf_add_column tableName="cart" name="discountCode" type="varchar(30)"> </cffunction> <cffunction name="down" returnType="void" output="no" access="remote"> <cf_remove_column tableName="cart" name="discountCode"> </cffunction> </cfcomponent> If anyone is interested in it, I could clean it up and release it. If not, oh well :) Eric O'Connell IBA Webmaster - 941-921-7443 x15 [EMAIL PROTECTED] www.bodytalksystem.com You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm CFCDev is supported by: Katapult Media, Inc. We are cool code geeks looking for fun projects to rock! www.katapultmedia.com An archive of the CFCDev list is available at www.mail-archive.com/cfcdev@cfczone.org ----------------------------------------- The information in this message may be proprietary and/or confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify First Data immediately by replying to this message and deleting it from your computer. You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm CFCDev is supported by: Katapult Media, Inc. We are cool code geeks looking for fun projects to rock! www.katapultmedia.com An archive of the CFCDev list is available at www.mail-archive.com/cfcdev@cfczone.org