SchemaMigration and nop 4.30 - several questions?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 anni tempo fa
Hi,
Yidna wrote:
Is there some documentation that best details how this migration stuff works  ?
Can you explain "2020/06/23 09:57:00:2551771" what does this mean

You can find more details about the nopCommerce migrations system in our documentation here.
This DateTime tick is needed to generate the migration Id. For more info about Fluentmigrator features, you can find in their documentation
3 anni tempo fa
>The code from nop team wroks.
The code from nop team works.
3 anni tempo fa
It would be handy to have plugin framework  to give the administrator the  choice whether to create/drop related db objects/data when installing/uninstalling plugin. sometimes you want to lose the plugin but not the config/data
3 anni tempo fa
Hi,
Recently I updated our store from nopCommerce 4.10 to 4.30
I tried to install Facebook Pixel plugin on our site but SQL table "FacebookPixelConfiguration" is not created even plugin is installed.
Error = SqlException: Invalid object name 'FacebookPixelConfiguration'.
We have several custom plugins & I shared my "MigrationVersionInfo" table.
https://freeimage.host/i/3Vyj07

Can someone help me to understand why migration process skipped table creation ? How to solve such issues?  
Migration schema for Facebook pixel
[NopMigration("2020/03/25 12:00:00", "Widgets.FacebookPixel base schema")]
2 anni tempo fa
=> Apply and call migration without using install/uninstall plugin in 4.3

/// <summary>
        /// apply migraion without install / uninstall a plugin
        //method for call migration
        /// </summary>
        /// <param name="application"></param>
        private void ApplyMigration(IApplicationBuilder application)
        {
            try
            {
                using (var serviceScope =
                  application.ApplicationServices.GetService<IServiceScopeFactory>().CreateScope())
                {
                    var runner = serviceScope.ServiceProvider.GetRequiredService<IMigrationRunner>();
                    try
                    {
                        runner.MigrateUp();
                    }
                    catch (Exception)
                    {
                        // ignored
                    }
                }
            }
            catch (Exception)
            {
                // ignored
            }
        }

---------need to call in Configure Method--------
public void Configure(IApplicationBuilder application)
        {
            //method for call migration
            ApplyMigration(application);
        }
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.