How to start manually DataMigrations? (4.30 to 4.60)

8 months ago
I am trying to upgrade from NopCommerce 4.30 to 4.60.4.
I have a couple of my own plugins, Avenue theme and plugins from Nop-Templates.
I finished refactoring my plugins and I already have the 4.60 compatible stuff from Nop-Templates.
I have put all these together and I am trying to run the Presentation project from Visual Studio.
Somehow the core database tables are still having the 4.30 structure.
Starting the web app does not run the upgrades. The Avenue theme throws an exception, expecting the 4.60 db table columns to be there.
I can see there are folders UpgradeTo440, UpgradeTo450 and UpgradeTo460 in \Libraries\Nop.Data\Migrations and their respective DataMigration.cs.
Is there a way to make these run without starting the presentation project? Perhaps like the trivial EF migrations from the VS powerShell console?

The latest content of my MigrationVersionInfo database table is as:
Version  AppliedOn  Description
637231428000000015  2020-09-21 22:13:06.000  Smart Product Collections Category Id Settings Migration
637233156000000012  2020-09-21 22:13:06.000  Sale Of The Day base schema
637237476000000000  2020-09-21 22:13:06.000  Social Feed base schema
637273440000000005  2023-08-08 16:10:14.000  nopCommerce version 4.40.0. Update Data
637273440000000010  2023-08-08 16:10:14.000  nopCommerce version 4.40.0. Update Localization
637273440000000015  2023-08-08 16:10:14.000  nopCommerce version 4.40.0. Update Settings
637547328000000005  2023-08-08 16:10:14.000  nopCommerce version 4.50.0. Update Data
637547328000000010  2023-08-08 16:10:14.000  nopCommerce version 4.50.0. Update Localization
637547328000000015  2023-08-08 16:10:14.000  nopCommerce version 4.50.0. Update Settings
637691616000000000  2023-08-08 16:10:14.000  Pseudo-migration to update appSettings.json file
637829856000000000  2023-08-08 16:10:14.000  Product video
637938720100000000  2023-08-08 16:10:14.000  SchemaMigration for 4.60.0
638016480000000000  2023-08-08 16:10:14.000  Move uploaded images to disk
637192635689037680  2023-08-08 16:10:14.000  Specification attribute grouping
638261280000000000  2023-08-08 16:10:14.000  Update datetime type precision
638059361410000000  2023-08-08 20:24:01.000  Added new fields to store table
8 months ago
Update: I realized migration is done by NopMigrator C# class which is based on FluentMigrator.
I am now compiling and running the FluentMigrator console tool. If successful I will post a step by step guide how it is done. If not I will keep asking questions here. The FluentMigrator Migrate.exe is .Net 4.6.1 and I seriously doubt it can work with the nopcommerce assemblies but let's see what will happen.
8 months ago
Update:
I downloaded the FluentMigrator project from here:
https://github.com/fluentmigrator/fluentmigrator/releases/tag/v3.3.2
I compiled and run it upon Nop.Data.dll
The command line looks as:
migrate.exe --conn "Server=FENIX;Database=nop;Trusted_Connection=True;MultipleActiveResultSets=True;Encrypt=False;" --provider SqlServer2016 --assembly "Nop.Data.dll" --task migrate --output --outputFilename migrateded.sql

It ended with error:
!!! Could not load file or assembly 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Reference assemblies should not be loaded for execution.  They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)
!!! +- Cannot load a reference assembly for execution.

It looks to me as typical .Net versions mismatch.
I don't know what to do now. If I do not get any advise here I will just create a manual .sql script which mimics what the three DataMigration.cs does.
8 months ago
I ended by manually creating an upgrade sql script. It took me just two or 3 days. It was worth it, worked like a charm! Still the new approach for using Tax plugin caught me unprepared. If you are planning a 4.30 to 4.60 jump please make sure to install, activate and setup this plugin on the new site: Tax.FixedOrByCountryStateZip. If not your VAT will appear as 0.
Thanks to all contributors for all the new and smoothly working features! You did a lot for three years!