Red Gate forums :: View topic - Renamed table columns cause build failure?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
Deployment Manager
Deployment Manager forum

Renamed table columns cause build failure?

Search in Deployment Manager forum
Post new topic   Reply to topic
Jump to:  
Author Message
swinghouse



Joined: 12 Sep 2011
Posts: 94

PostPosted: Wed May 22, 2013 3:05 pm    Post subject: Renamed table columns cause build failure? Reply with quote

We use your TeamCity plugin (v. 1.0.0.1064) to package our database changes in a TeamCity build project.

This usually works like a charm, but today we ran into trouble and need some help in getting back on track.

The below error message indicates that the problem has to do with a column that we renamed today:

Quote:
[14:41:36][Generating 0.155 upgrade script] SQL Compare Command Line V10.3.8.406
[14:41:36][Generating 0.155 upgrade script] ==============================================================================
[14:41:36][Generating 0.155 upgrade script] Copyright Red Gate Software Ltd 1999-2012
[14:41:36][Generating 0.155 upgrade script]
[14:41:37][Generating 0.155 upgrade script] Registering data sources
[14:41:51][Generating 0.155 upgrade script] Creating mappings
[14:41:51][Generating 0.155 upgrade script] Comparing
[14:41:51][Generating 0.155 upgrade script]
[14:41:51][Generating 0.155 upgrade script] Applying Command Line Items
[14:41:51][Generating 0.155 upgrade script]
[14:41:53][Generating 0.155 upgrade script] Retrieving migration scripts
[14:41:53][Generating 0.155 upgrade script] Checking for identical databases
[14:41:54][Generating 0.155 upgrade script] Creating SQL
[14:41:54][Generating 0.155 upgrade script] Inserting static data SQL into deployment script
[14:41:54][Generating 0.155 upgrade script] Saving SQL
[14:41:54][Generating 0.155 upgrade script] Error: Aborting due to High severity warning: Column [IsPEBag] on table
[14:41:54][Generating 0.155 upgrade script] [dbo].[TblBaseLabel] could not be matched to a column in the source table. The
[14:41:54][Generating 0.155 upgrade script] data in this column will be lost.
[14:41:56][Generating 0.155 upgrade script] ##teamcity[buildStatus status='FAILURE' text='Generating 0.155 upgrade script failed with exit code 61']
[14:42:08]sqlCI error occurred: RedGate.SQLCI.Engine.Error: Generating 0.155 upgrade script failed with exit code 61


Might I be doing something wrong or is there perhaps a bug in the TeamCity plugin?

/Mattias
Back to top
View user's profile Send private message
swinghouse



Joined: 12 Sep 2011
Posts: 94

PostPosted: Thu May 23, 2013 9:05 am    Post subject: Reply with quote

I added the /IgnoreParserErrors commandline switch to see if it would let me build the database, but to no avail.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6577

PostPosted: Tue May 28, 2013 10:39 am    Post subject: Reply with quote

Sorry for the confusion - is this a question about the TeamCity plugin? If so, I will take this discussion to email because this is not the right place.

Also, I do not know the answer to this problem. TC Plugin is beta and undocumented so I will more than likely have to escalate the issue to the development team.
Back to top
View user's profile Send private message
swinghouse



Joined: 12 Sep 2011
Posts: 94

PostPosted: Tue May 28, 2013 1:07 pm    Post subject: Reply with quote

Thanks for the reply, Brian!

Yes, the issue concerns the TeamCity plugin, sorry if I was a bit vague.

/Mattias
Back to top
View user's profile Send private message
fredendrix



Joined: 18 Dec 2012
Posts: 24
Location: Quebec (Canada)

PostPosted: Tue Oct 01, 2013 2:55 pm    Post subject: Reply with quote

Something new about this issue? I've got the same here and i don't know how to resolve...
Back to top
View user's profile Send private message
Emma A



Joined: 30 Mar 2009
Posts: 40

PostPosted: Thu Oct 03, 2013 11:11 am    Post subject: Reply with quote

The TeamCity plugin does not have a concept of object mappings and currently does not support the use of migration scripts.
The best work around for this is to use SQL Compare to handle the rename.
If you open SQL Compare and set the source to be either source control and then point at the repository or database (if it is up to date). Then set the target as the database which you are trying to upgrade.
On the Table Mapping tab find the table where you renamed the column, click on the status field for that row and then map up the old and new columns appropriately.
When you are happy with the mappings, click Compare Now on the Edit project dialog.
You will then need to select the changes you want to deploy and click on the Deployment Wizard and follow the instructions. You could just deploy the column rename in this manner.

Because the old column name is included in a package that is currently deployed. You will then need to turn off generate upgrade script in the TeamCity plugin and run a build and deploy the new package to all the environments where you had to update the column name using SQL Compare.
You can then turn on the Generate upgrade script option back on.
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