| Author |
Message |
jj
Joined: 24 Oct 2011 Posts: 2
|
Posted: Mon Oct 24, 2011 11:23 pm Post subject: Import from pre-existing repository |
|
|
Is there a way to link SQL Source Control to an existing repository of database scripts? Many years ago we setup an environment where we script our db objects as individual files (via SSMS Generate Scripts) and kept track of their changes in svn.
SSC seems like a much more robust method of keeping track of our database changes, but if it can't somehow link to our existing repository then we will lose years of change history for each object.
I know SQL Compare can compare an active db with a folder of scripts, so I figured there should be some sort of path to migrate our preexisting db object history into SSC.
Any thoughts?!?
Thanks in advance. |
|
| Back to top |
|
 |
chriskelly
Joined: 19 Apr 2010 Posts: 253 Location: Cambridge, UK
|
|
| Back to top |
|
 |
jj
Joined: 24 Oct 2011 Posts: 2
|
Posted: Thu Oct 27, 2011 5:12 pm Post subject: |
|
|
Thanks for the link!
I've done something similar to this before, but it takes a lot of time and you have to be very diligent. I'm not sure I'm going to go with this route, but just in case someone else is thinking about it, here is the general idea:
The idea is similar to the link above. You add your db to SQL Source Control (SSC), which creates a new repository/folder, then inspect the folder/file structure it created. You then take your preexisting repository and rename each file to match the same structure as the one created by SSC. Renaming does a drop/add, but the history of the file is maintained. After you have committed your changes, you should be able to instruct SSC to switch to using your repository just like the link above mentions.
This might make for an interesting project for Red Gate in the future: a program could inspect a preexisting repository and suggest what changes should be made to make it compatible with SSC. However, that seems like a lot of development work for something no one seems to be requesting. |
|
| Back to top |
|
 |
chriskelly
Joined: 19 Apr 2010 Posts: 253 Location: Cambridge, UK
|
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group