This project is read-only.

How to add Migrations to an existing module

Topics: Troubleshooting, Writing modules
Jun 19, 2012 at 1:42 PM


My module initially did not have Migrations, it was installed and enabled just fine without it.
After some time, there was a need to add migrations, so I followed instructions, added a respective file (Migrations.cs).
Now, how do I tell Orchard to pick this file and execute it? It does not happen on system restart, nor on disabling/re-enabling the module.
Is it possible to add migrations to an existing module at all?



Jun 19, 2012 at 6:08 PM

If you change the source code, Orchard will restart the shell, and check for any new migration. In this case, in will take the Create() method automatically.

Jun 21, 2012 at 12:40 PM

Yes, thank you, it worked, I must have done something wrong the first time.