Migration Script is not working in Branches

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

Postby joseph.tg » Wed Oct 23, 2013 5:32 am

Hi Team,
Can anyone update me the status of Migration V2 integrated SQL compare command line?
Is Migration V2 integrated SQL compare command line released? If not, what is the ETA for this?

Posts: 11
Joined: Thu May 30, 2013 6:53 am

Postby James Duffy » Thu Oct 24, 2013 1:33 pm

We released a beta build of SQL Compare last week that's compatible with the new migrations system. You can use the SQL Compare command line for all your migrations V2 needs!

You can download the new here: http://www.red-gate.com/migrations
James Duffy
Posts: 1
Joined: Thu Oct 24, 2013 1:29 pm
Location: Red Gate

Postby joseph.tg » Fri Nov 08, 2013 11:42 am

Hi Ruchika/James,

I have evaluated the migration v2 SqlCompare. This is working as per my requirements. Please clarify below points.

1) Is there any way to rollback the migration script changes.
2) I am already using the rollback mechanism for schema changes, if I use the new sql compare (mv2 integrated) how this will work? I mean will this break the existing rollback mechanism or not?
3) While evaluating MV2, I didn't set up the temp database, still it is working as expected. Is this temp database setup mandatory or not?
4) lastly, what is the ETA of the actual(not beta version) Mv2 integrated Sql Compare.

Posts: 11
Joined: Thu May 30, 2013 6:53 am

Postby Ruchika » Fri Nov 08, 2013 12:30 pm

Hi Joseph,

Yes, there is a provision to add rollback scripts which will be applied whenever you're doing a rollback. Basically, every migration script in V2 consists of two parts - an upgrade script and a downgrade script. As of now the user interface only allows you to add an upgrade script, but the engine code handles downgrade scripts as well. Let's say you wanted to rollback your database from v3.0 to v2.0 (the previous version), the migration engine would then look for the migrations scripts that had been applied as part of the upgrade from v2.0 to v3.0. It would then pick the corresponding rollback scripts and apply them in order before the SQL Compare Engine rolls back the rest of the schema change. As an example, if you're doing a table rename in your migration script, you could include a rollback script that would do the reverse of the rename. Let me know if you need any help with adding the rollback scripts.

Could you help clarify what you meant by whether this will break the existing rollback mechanism? The mechanism for SQL Compare rollback is still the same. The only difference here would be that the migration script rollbacks would be applied first.

The TempDb setup is not mandatory. MigrationsV2 by default tries to connect to LocalDb if you have one installed. I think that would explain why this still worked for you. :-)

Regarding your last point, we don't have an ETA yet, but we're working actively towards it. I'll keep you up-to-date on this.

In one of your previous comments you mentioned that "A check-in a command line script will execute and update the changes to the 'Test database'" from the TestBranch. Is it fair to assume that you're using the SQL Compare command line to achieve this? Also, I'm very keen to know how your environment was setup when you evaluated the beta. Let us know if you have any other feedback from your evaluation experience.


Posts: 9
Joined: Thu Aug 08, 2013 12:32 pm

Postby slynch13 » Wed Nov 20, 2013 9:01 pm

Is this also going to be included in the automation pack (sqlci.exe)?
Posts: 1
Joined: Wed Nov 20, 2013 8:59 pm


Return to SQL Source Control 3

Who is online

Users browsing this forum: Anu Deshpande and 1 guest