Red Gate forums :: View topic - Can I create a "stand alone" data migration script?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Source Control 3
SQL Source Control 3 forum

Can I create a "stand alone" data migration script?

Search in SQL Source Control 3 forum
Post new topic   Reply to topic
Jump to:  
Author Message
jswartsel



Joined: 25 Jul 2012
Posts: 1

PostPosted: Wed Jul 25, 2012 6:55 pm    Post subject: Can I create a "stand alone" data migration script? Reply with quote

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
View user's profile Send private message
David Atkinson



Joined: 05 Dec 2005
Posts: 1114
Location: Twitter: @dtabase

PostPosted: Wed Jul 25, 2012 10:10 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
bdw429s



Joined: 09 Aug 2012
Posts: 20
Location: Kansas

PostPosted: Thu Aug 16, 2012 5:52 pm    Post subject: Reply with quote

I asked the same question in this thread:
http://www.red-gate.com/MessageBoard/viewtopic.php?t=15664

I finally found this User Voice request which I voted for. Please vote for it too.

http://redgate.uservoice.com/forums/39019-sql-source-control/suggestions/2565864-create-migration-script-without-changes-to-any-dat
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic 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