Upgrading a module not setting version correctly

Topics: Writing modules
Jul 13, 2011 at 8:29 AM


I've been working from multiple machines, so sometimes my modules need to skip up a few versions. What seems to be happening is that the version number stored in Orchard_Framework_DataMigrationRecord is not the same as the last returned result from UpdateFromXX().

The UX is that I update the source, go to the website and see the feature update message. I click update next to the feature. The next page shows a message saying that the feature has been successfully updated, but also shows the message that it needs to be updated. At this point the database shows that the version number of the module has been incremented by 1. The contents of Migration.cs show that the module version should have been incremented by 9.

When I click to update again, it fails due to the table already being there when it tries to create one.

I deleted all the tables created later in the migration, and pressed update. The version number was incremented by 1 (to 14), and all the tables were created (even ones in methods UpdateFrom(>14).


Is this a bug in the migration process? Or am I doing something wrong here?

Jul 13, 2011 at 10:30 PM

It sounds like a bug. Please file it in the issue tracker, with a detailed explanation on how to reproduce the problem.