Best way to use RoundhousE with an existing database

328 views
Skip to first unread message

Keith Bloom

unread,
Sep 27, 2011, 10:59:56 AM9/27/11
to chucknorris
Hello,

I think RoundHouse is the best solution I have seen for managing
schema changes. Thanks for the effort and for the active support.

I have spent today extracting the schema from a legacy databases by
doing the following:

Put all the tables in to a file called 0001_BaseSchema.sql and put
this in the "up" folder
Exported the sprocs, views and functions and put them in the related
RoundHouse folder
Created a _BuildIInfo.xml file with the version number 0.0.0.0

This all works fine and I can deploy it to an empty database. It fails
though when I deploy it to an existing database. Understandable my as
the active database doesn't have any of the RoundHouse tables which
indicate the current version.

Is there a way around this though? I guess I would like to tell
RoundHouse that this is a baseline for an existing database and for it
to add the version tables.

Thanks, Keith.

Rob Reynolds

unread,
Sep 27, 2011, 4:37:42 PM9/27/11
to chucknorri...@googlegroups.com
We are working on a folder that will only be run when creating new databases. You can thank Andy Davis for the great ideas in that respect. That said, it is still vaporware. It shouldn't be too hard to put in for sql server at least. :D
____
Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder



--
You received this message because you are subscribed to the Google Groups "chucknorris" group.
To post to this group, send email to chucknorri...@googlegroups.com.
To unsubscribe from this group, send email to chucknorrisframe...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/chucknorrisframework?hl=en.


Alan Howard

unread,
Sep 28, 2011, 1:19:27 AM9/28/11
to chucknorri...@googlegroups.com
Hi Keith,

After playing with RH I too thought it would be a good fit for an existing db. In my dev environment the db is rebuilt each time the app builds, and I followed a similar process to you to create the initial scripts. On test though, I backed up the existing db and then got RH to create a new db which includes the RH objects by running the DBDeployment bat file (there's no db drop step before the create on test) and just used SQL Data Compare to pipe my existing data across. RH just works from that point on. Bit of a fuddle but it's one-time pain.

Cheers,
Alan

 

Keith Bloom

unread,
Sep 28, 2011, 3:44:55 AM9/28/11
to chucknorri...@googlegroups.com
Hi Alan,

Great.  It is good to hear a success story for using RH with a legacy database and I will try this out today.  Do you have a process for deploying the changes to production?

Thanks, Keith.

Alan Howard

unread,
Sep 28, 2011, 6:32:59 AM9/28/11
to chucknorri...@googlegroups.com
I haven't set that up yet. My existing customers have their own remote databases but I'm moving them to a shared hosted db so I have the luxury of bedding in RH while I do this migration. I'll get RH running in the staging environment in the same way I've done it for test since that data is pretty much disposable. I'll probably set up the new prod environment in the same way and use RH going forward. For my existing customers and their individual dbs I might continue to rely on syncing schema changes using scripts & SQL Compare. Not ideal but probably less hassle than mucking around with live systems.

Let us know how you go :)

Alan

Rob Reynolds

unread,
Sep 28, 2011, 7:46:53 AM9/28/11
to chucknorri...@googlegroups.com
Here is the enhancement for the one time scripts that are run only when a database is created https://github.com/chucknorris/roundhouse/issues/20

Rob Reynolds

unread,
Sep 28, 2011, 8:14:03 AM9/28/11
to chucknorri...@googlegroups.com
I just closed this enhancement as complete. 

Ways to get it:
1. Get latest and build.
3. chocolatey - cinst roundhouse
4. ruby gems - gem install roundhouse
5. nuget install roundhouse

obviously the last three are going to be the quickest.

Keith Bloom

unread,
Sep 28, 2011, 8:17:04 AM9/28/11
to chucknorri...@googlegroups.com
Wow, thanks Rob. That isl exactly what I need.

Keith.

Rob Reynolds

unread,
Sep 28, 2011, 8:38:30 AM9/28/11
to chucknorri...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages