Inheritance: System.Data.Entity.Migrations.DbMigrator
        public override void Uninstall()
        {
            //run the migrator. this will remove all the tables created by this migration
            var migrator = new OAuthDbMigrator(new Configuration());
            migrator.Update("0");

            base.Uninstall();
        }
        public override void Install()
        {
            //set db context to null to avoid any errors
            DatabaseManager.SetDbInitializer<OAuthDbContext>(null);

            //run the migrator. this will update any pending tasks or updates to database
            var migrator = new OAuthDbMigrator(new Configuration());
            migrator.Update();

            base.Install();
        }
        public void Run()
        {
            if (!DatabaseManager.IsDatabaseInstalled())
                return;

            //set db context to null to avoid any errors
            DatabaseManager.SetDbInitializer<OAuthDbContext>(null);

            //run the migrator. this will update any pending tasks or updates to database
            var migrator = new OAuthDbMigrator(new Configuration());
            migrator.Update();
        }
        public void Run()
        {
            if (!DatabaseManager.IsDatabaseInstalled())
            {
                return;
            }

            //set db context to null to avoid any errors
            DatabaseManager.SetDbInitializer <OAuthDbContext>(null);

            //run the migrator. this will update any pending tasks or updates to database
            var migrator = new OAuthDbMigrator(new Configuration());

            migrator.Update();
        }
        public void Run()
        {
            if (!DatabaseManager.IsDatabaseInstalled())
            {
                return;
            }

            //check if the plugin is installed or not?
            var pluginFinder = mobSocialEngine.ActiveEngine.Resolve <IPluginFinderService>();

            if (pluginFinder.FindPlugin("mobSocial.Plugins.oAuth") == null)
            {
                return; //plugin is not installed
            }
            //set db context to null to avoid any errors
            DatabaseManager.SetDbInitializer <OAuthDbContext>(null);

            //run the migrator. this will update any pending tasks or updates to database
            var migrator = new OAuthDbMigrator(new Configuration());

            migrator.Update();
        }