I am very interested in using one of the products to do migration but not only in the database but also the file system etc.
My initial thought was i would love to read the Application.ProductVersion but it returns a string but most of the migrations need a LONG or similar?
I don't know if anybody is doing this, but my idea was having 2 distinct versions of the migrate.
1 to migrate the product i.e. Change directories, or things in the file system etc where i would use the Application.ProductVersion
- to migrate the database where i would use a version number of the database which I presume would come from a field?
Is anybody using it this way?
Any ideas which product would support something like this?
My migrations are not always database specific but sometimes application specific.
The way things work at the moment it appears that every new version would have to be a whole number i.e. 1, 2, 3 , 4 etc... and doesn't take into account minor, revisions etc..
Look forward to any insight
Thanks
MigratorDotNet doesn't require that the version numbers be consecutive (actually, their current recommendation is to use timestamps formatted as longs). So if you are e.g. sure that the major version will never contain more than two digits, the minor version will never contain more than four, and the build number and revision number will never contain more than five digits each, you could combine this into a long. For example, 2.34.1023.86 would become 0200340102300086. If your next version is 2.42.0.2 (0200420000000002), the migration engine will handle that. Although it feels like a bit of a hack (albeit one that I like), it should work to create a separate assembly with "migrations" that actually manipulate the file system etc. However, you'd possibly need a separate database to contain the SchemaInfo table that MigratorDotNet uses to keep track of the applied versions. Similar hacks could probably work with other migration products.