Have you looked at my schema management tool. It's not quite the same idea, but reasonably close. Definitely covers the "make sure the database schemas are in sync" job. I just released an update not 10 minutes ago at http://www.barneyb.com/barneyblog/2007/07/13/schema-tool-update/.
cheers, barneyb On 7/13/07, Eric O'Connell <[EMAIL PROTECTED]> wrote:
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/[email protected]
-- Barney Boisvert [EMAIL PROTECTED] http://www.barneyb.com/ Got Gmail? I have 100 invites. 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/[email protected]
