OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.38k stars 1.12k forks source link

Adding migration Create() method to an existing module that has been installed doesn't get executed #1935

Open orchardbot opened 13 years ago

orchardbot commented 13 years ago

Carlbm created: https://orchard.codeplex.com/workitem/18108

Create a new module that has no DataMigrationImpl. Install the module. Add a DataMigrationImpl to the module. Go to the modules page. You'd expect there be an upgrade message, but there isn't. Disable, enable the module. The Create() method is not run.

I would have expected there to be a way to add a migration script to a module that already exists without a migration script.

I eventually got around this by adding a record to the Orchard_Framework_DataMigrationRecord table with a Version of 1 and then created an UpdateFrom1() method.

orchardbot commented 13 years ago

Jeb746966 commented:

I didn't have this problem. I had an existing module, later on I added a datamigrations file using codegen.
Both in the development environment, and in the deployment environment I was prompted with the upgrade notice. If you experienced this in the development environment, were you using IIS Express ? On occasion I've had issues because the site was still running in IIS Express and it didn't recompile the module.