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

jswartseljswartsel Posts: 2
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

Comments

Sign In or Register to comment.