How can we help you today? How can we help you today?
matt_hosking
Here it is: "C:\Program Files (x86)\Red Gate\SQL Compare 10\SQLCompare.exe" /sourcecontrol1 /revision1:Latest /scriptsfolderxml:"%teamcity.build.checkoutDir%\Build\compare.xml" /migrationfolderxml:"%teamcity.build.checkoutDir%\Build\migration.xml" /scripts2:"%teamcity.build.checkoutDir%\sourcedb" /options:if,ifg,iw,ie,iq,nt,iu,iup,ip,nc /scriptfile:"%teamcity.build.checkoutDir%\Build\Scripts\%Version%b.sql" Where %Version% = 4.0.0 (at the moment), check out dir is agent-side default check out dir and the sourcedb folder is the source-controlled (SQL Source Control) schema folder for the version to compare against (couldn't see how to supply 'scriptsfolderxml' for the second source control). Compare.xml <?xml version="1.0" encoding="utf-16" standalone="yes"?> <!-- SQL Compare 10 SQL Compare Version:10.1.0.102--> <ISOCCompareLocation version="1" type="SvnLocation"> <RepositoryUrl>http://[removed]/trunk/database/Schema/</RepositoryUrl&gt; </ISOCCompareLocation> Migration.xml <?xml version="1.0" encoding="utf-16" standalone="yes"?> <!-- SQL Compare 10 SQL Compare Version:10.1.0.102--> <ISOCCompareLocation version="1" type="SvnLocation"> <RepositoryUrl>http://[removed]/trunk/database/Migration Scripts/</RepositoryUrl> </ISOCCompareLocation> / comments
Here it is: "C:\Program Files (x86)\Red Gate\SQL Compare 10\SQLCompare.exe" /sourcecontrol1 /revision1:Latest /scriptsfolderxml:"%teamcity.build.checkoutDir%\Build\compare.xml" /migrationfolderxml:...
0 votes
Scratch that - it seems that unless you use source control as the source for the database, migration scripts are ignored (even though it actually says it is retrieving them in the output). However, there's good news: I finally got it to work. Here's what I did: Created a project in the SQL Compare UI, specifying source control as the source (not using scripts), mirroring exactly what I was doing in the command line. Created a deployment script. Saved the project. Opened the project file (in '[documents]\SQL Compare\SharedProjects') in a text editor. Copied the contents of the 'ScriptFolderLocation' and 'MigrationsFolderLocation' elements to separate XML files, replacing '<' and '>' with '<' and '>' respectively and saving in UCS-2 Little Endian (using Notepad++) - this is required due to the UTF-16 in the header. Specified the above XML files as the '/scriptsfolderxml' and '/migrationfolderxml' parameters, along with '/sourcecontrol1' parameter (no value despite what command line help says), '/revision1:Latest' and all my other usual parameters (except '/scripts1' of course). And it worked (migration script finally included). I'm not sure if registering the source control in SQL Compare (as part of creating the project), actually running the comparison, creating the deployment script, or getting those two XML files exactly right is what fixed it, but I no longer get an 'object reference' error (due to one or more of these).[/list] / comments
Scratch that - it seems that unless you use source control as the source for the database, migration scripts are ignored (even though it actually says it is retrieving them in the output). However,...
0 votes
Will SQL Source Control be re-built against Subversion 1.7 in order to use the more efficient HTTP v2 protocol and next generation working copy for better performance? / comments
Will SQL Source Control be re-built against Subversion 1.7 in order to use the more efficient HTTP v2 protocol and next generation working copy for better performance?
0 votes