Closed Maarten88 closed 10 years ago
That's strange indeed. I have a test exactly for that purpose and it passes. Are you using .Net 4 or .Net 4.5?
The error is in line 160: https://bitbucket.org/sapiensworks/caveman-tools/src/8bfd0af7d48ea1ee48518e345525ab756c2a1146/src/CavemanTools/SemanticVersion.cs?at=devel it should be: if (remain.Length >= 2)
Why do you think that? Test passes for 1.1.0 value. I don't get it how "1.1.0" is transformed into "1.0.0"
I don't understand how your test can pass. Using "1.1" it does work, because then the SemanticVersion has two parts and the second "1" get parsed. If I use "1.1.0" then the version has three parts and the second '1' is skipped, so minor stays at its default 0.
I am using Cavemantools 3.4.0 and SqlFu 2.3.0.
I'll try a new test
OK. I had the wrong test. I've added one specifically for parsing 1.1.0 and it fails. I'll fix caveman tools and do a release asap. Thank you for your help!
Update released.
tnx!
I have created a first Migration class (version 1.0.0) and it works fine. Now I need to add a migration to be able to deploy an update (version 1.1.0). As I understand, I have to change the version of my initial Migration class to 1.1.0 and update it to create the new schema, and add a second class containing the migration from 1.0.0 to 1.1.0, by setting these two values in the Migration attribute. However, my migration just does not seem to pick up the version numbers from the attribute and the migration task is never called.
I have tried to debug it, and it seems something deep inside goes wrong creating the migration class. If I reduce the migration to this:
It outputs:
I think that is incorrect and the AbstractMigrationTask shoud have set NextVersion to 1.1.0. Is this a bug? Or am I doing it wrong?