-
Notifications
You must be signed in to change notification settings - Fork 245
GettingStarted
#Getting Started
##Introduction Welcome to RoundhousE (RH)! RH is one of the most intelligent database change management (also known as migration framework) OSS tools out there. Over the next couple of chapters you are going to learn how to effectively use RoundhousE to solve the complex business problem of managing change for your database. You will see that RH makes it really easy and as you learn the tool, you will wonder how you ever used anything else.
##Prerequisites
###Database Installed
Whatever database you are going to use, be it SQL Server or be it MySQL, needs to be installed so you can do database change management.
###.NET Framework 3.5
You will also need to have the .NET framework installed. Currently RH uses 3.5.
###Other Prerequisites
The install agent (usually a person running rh) needs to be able to create databases on the database (which usually means SA).
##Run the Sample for Familiarization
If you've downloaded the application, the best way to see the power of RoundhousE is to actually run the sample. It will also help you familiarize yourself with how RoundhousE works.
###Sample Prerequisites
The sample is run against SQL Server 2005/2008 (and it works with express as well), so you would need that installed. You can also attempt to run the sample against other database types.
###Running It
-
Go to code_drop/sample (if you have the source) or to sample if you downloaded the release. Go into the deployment folder.
-
Run LOCAL.DBDeployment.bat.
-
Press {Enter}. Notice all of the things it does. It just created our database, versioned it, then applied all of the database scripts (marking them as part of this version). Then it saved the output of what it ran to a folder.
###Roundhouse Change Drop Folder
Notice how it ended telling us there was a folder where it put all of the changes it made. Let's head there.
Below is the output folder. The structure of the output folder is databasename\server\yyyyMMdd_HHmmss_ffff.
The convention here is the common application data folder on a machine followed by RoundhousE. Then we have a folder for the particular database followed by the instance. The actual folder we drop the changes into are YYYYMMDD_HHmmss_fractions. Hence the one in the picture was run on 06/07/2011 at 21:54:37 with so many fractions of a second.
In the folder we see two things:
The migration log (roundhouse.changes.log) and the actual sql files that it ran get dropped into the itemsRan folder.
You can see that on a first time run, it's pretty much a mirror of what you have in your sql migrations folder.
Let's take a look at that change log file more in depth.
###RoundhousE Migration Process
RH goes through several stages when it runs. Let's take a look at the change log file and talk about each part of the migration process.
####Information Stage
Running RoundhousE v0.8.0.305 against (local) - TestRoundhousE.
Looking in C:\code\roundhouse\code_drop\sample\deployment\..\db\SQLServer\TestRoundhousE for scripts to run.
Please press enter when ready to kick...
The first thing you notice is that it tells you is the version and what server and what database it is going to run on. The database does not have to exist prior to run for SQL Server. It will create it automatically. Then it mentions where it is going to look for scripts. Next and slightly important, when it is in interactive mode (the default), it stops and gives you the opportunity to double check to be sure this is correct.