4.5 Upgrade not running migration

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 anni tempo fa
As soon as I run th site I get an error that the column LastEnabledUtc does not exist. I see the migration. I've placed break points, updated the date time parameter to force it to be different etc and nothing works. It simply doesn't run before the route provider is trying to get things done. This is frustrating.

Any help on why the data migration in Nop.Data.Migrations.UpgradeTo450 doesn't run?
2 anni tempo fa
What version of nopCommerce are you upgrading from?   'Old' versions still require the SQL scripts to be applied first.
https://docs.nopcommerce.com/en/installation-and-upgrading/upgrading-nopcommerce.html
2 anni tempo fa
I figured out the problem. The two Nop-Templates plugins (Customer Reminders and HelpDesk) that use scheduled tasks are checking on tasks in the route provider....which is a problem on first run since route provider is called before the nopengine starts...where migrations are done.

I have a ticket open with them and working to resolution.
2 anni tempo fa
Hi,

This could happen if you have some code in any INopStartup implementation that uses ScheduledTasks (or in the RouteProvider etc.) basically any code that is executed at startup.
The problem is that the code is run prior to the migrations.
It probably should be the other way around but it is what it is.
Simply find this code and comment it so that the migration can be run properly and then uncomment it and all should be fine.

Thanks,
Boyko
2 anni tempo fa
phuff34 wrote:
I figured out the problem. The two Nop-Templates plugins (Customer Reminders and HelpDesk) that use scheduled tasks are checking on tasks in the route provider....which is a problem on first run since route provider is called before the nopengine starts...where migrations are done.

I have a ticket open with them and working to resolution.


Hi phuff34,

Probably you are using an older version of the plugin.
Simply update it.

p.s: I just replied to you  prior to your last reply.

Thanks,
Boyko
2 anni tempo fa
Nop-Templates.com wrote:
Hi,

This could happen if you have some code in any INopStartup implementation that uses ScheduledTasks (or in the RouteProvider etc.) basically any code that is executed at startup.
The problem is that the code is run prior to the migrations.
It probably should be the other way around but it is what it is.
Simply find this code and comment it so that the migration can be run properly and then uncomment it and all should be fine.

Thanks,
Boyko


Correct. Or remove the plugin from the plugins.json. Run it. Then re-add it. It will only be a problem the first time you try to run the new solution then will work once migrations are run. Personally, I feel like nop should be running those migrations earlier in the pipeline.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.