Red Gate forums :: View topic - Migration Script is not working in Branches
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

Migration Script is not working in Branches

Search in SQL Source Control 3 forum
Post new topic   Reply to topic
Jump to:  
Go to page 1, 2  Next
Author Message
joseph.tg



Joined: 30 May 2013
Posts: 11

PostPosted: Mon Jul 22, 2013 1:03 pm    Post subject: Migration Script is not working in Branches Reply with quote

Hi Team,

I have Dev,Test and Stage branches created in TFS. Dev I have linked 'Dev Branch' to the Red gate Source control and developers are able to commit their changes properly.

For the 'Test Server' deployment, we are merging the selected changes directly from 'Dev Branch' to 'Test Branch' from 'Dev Branch'. while check-in a command line script will execute and it will update the changes to the 'Test database'.

For the 'Stage Server' deployment, we are merging the selected changes from 'Test Branch' to ' Stage Branch'. while check-in a command line script will execute and it will update the changes from 'Stage Branch' to the 'Stage database'.

Now I am facing an issue with migration script. Migration script only considering in 'Dev Branch'. While doing the Test/Staging deployment these migration scripts are not considering.

How to resolve this issue?
How the branch structure will support in red gate source control?

Regards,
Joseph
Back to top
View user's profile Send private message
eddie davis



Joined: 14 Jun 2006
Posts: 889
Location: Red Gate Software

PostPosted: Wed Jul 24, 2013 3:00 pm    Post subject: Reply with quote

Hi Joseph, thank you for your forum post.

The current way that the Migration Scripts operate, they do not support or work across branches.

The good news is that these is a project in development, known as Migrations V2, which is planned to address the branching issues. Sadly I do not have an ETA as to when this new version of the Migrations process will become available.

When I receive further information, I will update this forum post.

Many Thanks
Eddie
_________________
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
David Pond
Site Admin


Joined: 06 Mar 2012
Posts: 14
Location: Cambridge, UK

PostPosted: Wed Jul 24, 2013 8:53 pm    Post subject: Reply with quote

Hi Joseph,

You can join our Google group where we're discussing the development of migrations v2 here: https://groups.google.com/group/red-gate-migrations

We've just released an early access build of SoC to demonstrate the approach we're considering.

David
Back to top
View user's profile Send private message
joseph.tg



Joined: 30 May 2013
Posts: 11

PostPosted: Mon Aug 05, 2013 11:46 am    Post subject: Reply with quote

Hi Team,

We are in the middle of Red Gate source control implementation. Can you please update me the ETA of this functionality.

Also we are using SQL compare and SQL Data Compare for automated (Command-line) deployment. Are we going to integrate the migration scripts functionality soon? What will be the ETA of this?

My requirements are:
1) Migration scripts should work across the branches. Means, I need to deploy the database changes from Branch to database including migration scripts.
2) I need to include custom scripts for the deployment, this also should work in branch architecture.
3) Both Migration scripts and Custom scripts need to deploy from one Branch to databases through the command line scripts

Can any one update me, whether above 3 points are going to cover with new release or not.

Regards,
Joseph
Back to top
View user's profile Send private message
sherr



Joined: 19 Mar 2009
Posts: 125
Location: Cambridge

PostPosted: Mon Aug 05, 2013 1:49 pm    Post subject: Migrations v2 Early Access Release is now available Reply with quote

Hi Joseph,

The early access release of SQL Source Control with Migrations v2 is now available. You can read more about this and download it from http://documentation.red-gate.com/display/MV2/SQL+Source+Control+-+Migrations+V2+early+access+release.

We do not have a command line yet, but should have that shortly (within a week or 2). I will update this forum as soon as it's available. This will help with automated deployments and pick up Migration scripts. It will then go into SQL Compare and SQL Data Compare (GUI and command lines), but I don't have an estimate for this yet.

Regarding your requirements:
1) Migration scripts should work across the branches. Means, I need to deploy the database changes from Branch to database including migration scripts.
This should work. We no longer rely on repository location or revision number so that Migrations will work across branches.

2) I need to include custom scripts for the deployment, this also should work in branch architecture.
I don't understand how a custom script is different from a migration script that is used during deployment. Could you explain this more?

3) Both Migration scripts and Custom scripts need to deploy from one Branch to databases through the command line scripts
As mentioned above, we should have a command line shortly that will pick up Migration scripts to be used in automated deployments. I'm not sure about what you mean by Custom scripts. Migration scripts are custom scripts that are re-used by SQL Compare during deployment.

Cheers!
_________________
Thank you!
Stephanie M. Herr Smile
Delivery Product Manager
Back to top
View user's profile Send private message
joseph.tg



Joined: 30 May 2013
Posts: 11

PostPosted: Mon Aug 05, 2013 2:53 pm    Post subject: Reply with quote

Hi,

Custom script means, suppose I have to update some data in a table as part of a deployment. This is not a part of DDL changes. In this case I want to create a script and execute the same at the time of deployment.

How we can achieve this with Migration Script V2 ?

Regards,
Joseph
Back to top
View user's profile Send private message
sherr



Joined: 19 Mar 2009
Posts: 125
Location: Cambridge

PostPosted: Mon Aug 05, 2013 3:06 pm    Post subject: Custom Script Reply with quote

Hi Joseph,

Thanks for clarifying. In Migrations v2, a migration script doesn't have to be tied to DDL changes. So, you can just write your UPDATE script as a migration script and this will be picked up like all the other migrations. To do this, use the "Add migration script..." button on the Migrations tab.
_________________
Thank you!
Stephanie M. Herr Smile
Delivery Product Manager
Back to top
View user's profile Send private message
joseph.tg



Joined: 30 May 2013
Posts: 11

PostPosted: Tue Aug 06, 2013 6:46 am    Post subject: Reply with quote

Hi Stephanie,

Thanks for your quick response!

I am using command-line SQL Compare for automation. What will be the ETA of this Migration V2 integrated command-line SQL Compare
Can I expect this in next 3 months?
If it is more than that, is there any alternate method for this?

I want to communicate the ETA with my team. Can you help me on this.

Regards,
Joseph
Back to top
View user's profile Send private message
sherr



Joined: 19 Mar 2009
Posts: 125
Location: Cambridge

PostPosted: Tue Aug 06, 2013 7:06 am    Post subject: ETA for command-line integration Reply with quote

Hi Joseph,

We should have a command line that will do what you need within the next week or 2. This will pick up migration scripts and also do a SQL Compare of the source and target to either generate a deployment script or synch the target directly. Just like SQL Compare will do.

It's separate for now while we integrate Migrations v2 into the SQL Compare GUI. Once this integration is done, then we'll have a release of SQL Compare with the updated command line to pick up the new migrations.

So, you can use this alternative command line to do automated deployments (esp. in CI environments) until SQL Compare is ready. It will have the same licensing requirements as SQL Compare.

I hope this helps! We'd love to hear how you get on with the SQL Source Control Early Access Release and this migration command line tool.
_________________
Thank you!
Stephanie M. Herr Smile
Delivery Product Manager
Back to top
View user's profile Send private message
Ruchika



Joined: 08 Aug 2013
Posts: 5

PostPosted: Thu Aug 08, 2013 1:51 pm    Post subject: Reply with quote

Hi Joseph,

As Stephanie mentioned, you can now download the command line tool to use in your automated deployments from here: http://documentation.red-gate.com/display/MV2/

The above link also contains documentation to help you get started with migrations V2. If you want to be more involved in our development decisions, please join us at https://groups.google.com/group/red-gate-migrations

Let me know if you need any help with the command line tool.

Thanks,

Ruchika Raj
SQL Source Control Development Team
Red Gate Software Ltd.
T: 01223 438855
Back to top
View user's profile Send private message
joseph.tg



Joined: 30 May 2013
Posts: 11

PostPosted: Tue Aug 13, 2013 12:09 pm    Post subject: Reply with quote

Hi Ruchika,

Can you explain how to generate migration script using command line? Is there any worked example for this?

Regards,
Joseph
Back to top
View user's profile Send private message
Ruchika



Joined: 08 Aug 2013
Posts: 5

PostPosted: Thu Aug 15, 2013 5:30 pm    Post subject: Reply with quote

Hi Joseph,

I've written a quick guide to help you with the command line tool:

ftp://support.red-gate.com/patches/SQL_Compare/Help%20files/Using_Migrations_v2_command_line_tool.pdf


Let me know if you still need any help.



Cheers,
Ruchika
Back to top
View user's profile Send private message
joseph.tg



Joined: 30 May 2013
Posts: 11

PostPosted: Wed Sep 04, 2013 12:47 pm    Post subject: Reply with quote

Hi Ruchika,

Now I am using SQL compare command line for automated deployment
(SqlCompare.exe).
What is the ETA of Migration V2 integrated SQL compare command line?

Thanks,
Joseph
Back to top
View user's profile Send private message
Ruchika



Joined: 08 Aug 2013
Posts: 5

PostPosted: Fri Sep 06, 2013 4:09 pm    Post subject: Reply with quote

Hi Joseph,

We're expecting to do a beta release of SQL Compare with Migrations V2 sometime during the 2nd week of October. Meanwhile, were you able to use the migs.exe command line to generate your deployment scripts?


Cheers,
Ruchika
Back to top
View user's profile Send private message
joseph.tg



Joined: 30 May 2013
Posts: 11

PostPosted: Wed Oct 16, 2013 1:19 pm    Post subject: Reply with quote

Hi Ruchika,

Is Migration V2 integrated SQL compare command line released? If not, what is the ETA for this?

Regards,
Joseph
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Go to page 1, 2  Next
Page 1 of 2

 
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