I Have done the following
Generated Chnagelog for reference database
Next Generated Changelog for target database
I am expecting the following
liquibase should compare this two changelog files and give me the updates
Please let me know if we can do it using liquibase
What you are wanting to do isn't really possible right now. See this question.
How generate ChangelogFile by comparing two existing changelog files
You should be able to run liquibase diffChangeLog though to compare the two databases directly. If you cannot connect to both databases at the same time, you won't be able to use that technique though. I think the Liquibase developers are working on that capability though.
Related
I have these ant scripts that build and deploy my appservers. My system though is actually over 3 servers. They all use the same deploy script (w/flags) and all work fine.
Problem is there are some dependencies. They all use the same database so I need a way to stop all appservers across all machines before the build first happens on machine 1. Then I need the deployment on machine 1 to go and complete first as it's the one that deals with the database build (which all appservers need to start).
I've had a search around and there are some tools that might be useful but they all seem overkill for what I need.
What do you think would be the best tool to sync and manage the ant builds over multiple machines (all running linux)?
Thanks,
Ryuzaki
You could make your database changes non-breaking, run your database change scripts first and then deploy to your appservers. This way your code changes aren't intrinsically tied to your database changes and both can happen independently.
When I say non-breaking I mean that database changes are written in such a way that 2 different version of code can function against the same database. For example rather than renaming columns, you add a new one instead.
Given a Team Foundation Server repository, how can I retrieve all checked in versions (or versions later than a specific changeset) of a specific file?
The reason I'm asking is I want to track what versions contain a certain string. So I thought I'd download them all and then grep or similar.
There is no standard way to do it from the UI or the commandline, but it's easy to do from the Client Object Model.
You can use the VersionControlServer.DownloadFile method and supply a versionspec. And you can use the VersionControlServer.QueryHistory method to query all the different changeset versions of the file.
Combined you'd be able to piece together a small Console application or a Powershell script to grab all versions. And grep them at the same time by adding a bit of Regex :).
Check out this blog post to see how to connect to TFS and get hold of the ProjectCollection from which you can request the VersionControlServer object.
This is a bit of a strange one, but I was wondering if anyone might have seen it before and know of a cure.
Basically, we have updated a schema and the format has radically changed. The schema was used in a number of maps, so these have also been updated.
When testing one of the maps (Visual Studio right click, test map) it claims that the test suceeds, but the resultant xml is in the old schema format and not the new updated format.
The mapper shows the correct schema, I have tried rebuilding and even redeploying just in case something was holding on to the old schema somehow, but it still maps to the old format.
Any suggestions welcome.
Cheers
Stu.
This is a bug feature of Visual Studio BizTalk projects.
In your BizTalk solution, ensure that "show all files" (at the top) is set, and then manually run through your affected Schemas, and delete the generated .xsd.cs files.
Do the same for your updated maps (btm.cs) as well, and then rebuild the project.
(BizTalk will rebuild the *.cs files)
Also, at deployment / import time, ensure that you:
Re-GAC your assemblies
Re start the BizTalk host processes
Is there a posible to get previous version of code in TFS Build script?
I need to get curren version of config file and version from previous check-in, compare them, check if some files in other folders have the same changes and save the results to log.
We have a similar situation, where we need to get data from a file before getting the latest version. I don't know how much of this is applicable to you, but here's how we do it:
Since we're using CruiseControl.Net for build management, we turn off the autogetsource control in our configurations.
We have built a MSBuild Custom Task (if it's a fairly simple task, you can do it in-line) that retrieves the information we require prior to Get Latest.
"Manually" perform the tf get operation (as an MSBuild task)
Re-run our custom task to retrieve the new information, and act upon differences (for example, use as condition for later tasks)
Both in our case and yours I guess that a method for retrieving/comparing with the "previous" version of an item would have been preferred, but I was stumped there; I couldn't find any relatively easy way to retrieve the previous change set for an item. If anyone has any good ideas there, I'd like to hear these as well :).
I'm working on an ASP.NET MVC website. Each time I do important modifications, I copy/paste the entire folder of my solution and rename it something like MySolution v1.1, next time MySolution v1.2, ... In that way, I can always step back easily and keep versions. But I always have problems with the database.
Example:
I work on MySolution v1.1 with the database in the App_Data named MyDB1.mdf
I copy/paste previous version in MySolution v1.2 folder
I cannot run successfully this newly created solution because Visual Studio will try to recreate the database named MyDB1.mdf but this one already exist (in the previous folder).
I had to change database name in the connectionstring of the web.config file and clean the App_Data folder.
This is not a good way of doing things. Furthermore, I lost my data in my DB because I delete it each time.
Does someone can give me advices for versioning my different solutions?
I hope I was clear.
Thanks in advance.
I'd suggest using a revision control system, such as Subversion or Mercurial (using TortoiseHG). This way, you can just revert to a previous version of your code if you don't like the changes you made.
I encourage you to get familar with source control. This is really important and every developer should know about it.
Here some source control systems:
Subversion
GIT
Mercurial
There are other version control systems as well. Personally I prefer Mercurial.
Hope this helps!
Use version control.
If you are working in VS you can use TFS. It has good integration into it and easy to learn (free TFS for open source projects can be found on www.codeplex.com).
Also you can use GIT (www.github.com), TortoiseSVN, etc.
Also you can do versioning for Database. In this case you can store database schema in Database project or create change scripts for database.