Reset module, force reinstall

Topics: Writing modules
Jul 8, 2011 at 3:04 AM

during dev, i want to reset everything for my module so it runs like a fresh install. I deleted everything I could find in the database, but the module still blows up on startup saying my table is missing. What is it looking at to determine that the migrations shouldnt call Create again?

Coordinator
Jul 8, 2011 at 3:39 AM

There is a table names Orchard_DataMigrations where you can find the name of the migration class for this module, and which version it's been updated with. Remove those records, and it will run again.

Jul 8, 2011 at 1:17 PM

hm i'd already removed this record, and it's still blowing up when I have the module in the modules folder (missing table). but it appears the code that is blowing up is in a class which implements IOrchardShellEvents and IBackgroundTask, do these get executed early and automatically? I would expect it wouldnt be getting called unless the module is in "installed" state... Thanks

 

Jul 8, 2011 at 1:58 PM

nope i tried commenting out this code, and it still wont create the table. something is still cached.

 

Jul 8, 2011 at 2:02 PM

ok with the commented out code, it allowed me to go to the modules section, and click "update" on this module to get it to re-create the table. I still don't know where the code was looking to determine that the module was still in "enabled" state, but this seems to get me back running now.