| Author |
Message |
jswartsel
Joined: 25 Jul 2012 Posts: 1
|
Posted: Wed Jul 25, 2012 6:55 pm Post subject: Can I create a "stand alone" data migration script? |
|
|
Hey everyone,
My team is evaluating SQL Source Control and we are hung up on something. I know that you can create custom migration scripts and associate them with a change-set (ala schema change). So for example if I am adding a non-nullable column to a table with records in it, I could attach a custom migration script that would provide values.
Now let's say I've been given a requirement that in the next version of our software, all e-mail addresses in a particular column should be updated to be in ALL CAPS. This would be accomplished by a single UPDATE statement, but wouldn't require any schema changes.
As a developer, I would want to be able to check this update script in to source control along with all my other source controlled scripts, so that when I go to build, our Continuous Integration process will update all email addresses in the QA database. Similarly, I want this script to run when we deploy to production using the accumulated set of change-set scripts.
Is there any way to check in a data-only migration script that is not associated with a schema change?
Thanks,
Justin Swartsel |
|
| Back to top |
|
 |
David Atkinson
Joined: 05 Dec 2005 Posts: 1080
|
Posted: Wed Jul 25, 2012 10:10 pm Post subject: |
|
|
This isn't yet possible, although it's something that we'd like to allow eventually. The workaround is to put the data migration script in a migration script alongside a schema change.
David Atkinson
Red Gate |
|
| Back to top |
|
 |
bdw429s
Joined: 09 Aug 2012 Posts: 20 Location: Kansas
|
|
| 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