public Configuration()
        {
            AutomaticMigrationsEnabled = true;

            AutomaticMigrationDataLossAllowed = true;

            MigrationsAssembly  = Assembly.GetExecutingAssembly();
            MigrationsNamespace = "Nop.Plugin.WebApi.MobSocial.Migrations";

            //specify database so that it doesn't throw error during migration. Otherwise, for some reasons it defaults to sqlce and gives error
            var dataSettingsManager = new DataSettingsManager();
            var dataSettings        = dataSettingsManager.LoadSettings();

            TargetDatabase = new DbConnectionInfo(dataSettings.DataConnectionString, DatabaseHelpers.GetDbProviderName(dataSettings.DataProvider));
        }