From d40e0b22784327dff0680465df1c53740c9b4e98 Mon Sep 17 00:00:00 2001 From: Ron Rennick Date: Wed, 8 Jan 2020 22:53:05 -0400 Subject: [PATCH] bump schema and plugin versions --- action-scheduler.php | 14 +++++++------- .../abstracts/ActionScheduler_Abstract_Schema.php | 6 +++--- classes/schema/ActionScheduler_LoggerSchema.php | 5 ++++- classes/schema/ActionScheduler_StoreSchema.php | 5 ++++- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/action-scheduler.php b/action-scheduler.php index 9bcfe66a3..4ffb2660d 100644 --- a/action-scheduler.php +++ b/action-scheduler.php @@ -5,7 +5,7 @@ * Description: A robust scheduling library for use in WordPress plugins. * Author: Automattic * Author URI: https://automattic.com/ - * Version: 3.0.0 + * Version: 3.0.1 * License: GPLv3 * * Copyright 2019 Automattic, Inc. (https://automattic.com/contact/) @@ -25,28 +25,28 @@ * */ -if ( ! function_exists( 'action_scheduler_register_3_dot_0_dot_0' ) ) { +if ( ! function_exists( 'action_scheduler_register_3_dot_0_dot_1' ) ) { if ( ! class_exists( 'ActionScheduler_Versions' ) ) { require_once( 'classes/ActionScheduler_Versions.php' ); add_action( 'plugins_loaded', array( 'ActionScheduler_Versions', 'initialize_latest_version' ), 1, 0 ); } - add_action( 'plugins_loaded', 'action_scheduler_register_3_dot_0_dot_0', 0, 0 ); + add_action( 'plugins_loaded', 'action_scheduler_register_3_dot_0_dot_1', 0, 0 ); - function action_scheduler_register_3_dot_0_dot_0() { + function action_scheduler_register_3_dot_0_dot_1() { $versions = ActionScheduler_Versions::instance(); - $versions->register( '3.0.0', 'action_scheduler_initialize_3_dot_0_dot_0' ); + $versions->register( '3.0.1', 'action_scheduler_initialize_3_dot_0_dot_1' ); } - function action_scheduler_initialize_3_dot_0_dot_0() { + function action_scheduler_initialize_3_dot_0_dot_1() { require_once( 'classes/abstracts/ActionScheduler.php' ); ActionScheduler::init( __FILE__ ); } // Support usage in themes - load this version if no plugin has loaded a version yet. if ( did_action( 'plugins_loaded' ) && ! class_exists( 'ActionScheduler' ) ) { - action_scheduler_register_3_dot_0_dot_0(); + action_scheduler_register_3_dot_0_dot_1(); do_action( 'action_scheduler_pre_theme_init' ); ActionScheduler_Versions::initialize_latest_version(); } diff --git a/classes/abstracts/ActionScheduler_Abstract_Schema.php b/classes/abstracts/ActionScheduler_Abstract_Schema.php index 184792587..f02c84d8e 100644 --- a/classes/abstracts/ActionScheduler_Abstract_Schema.php +++ b/classes/abstracts/ActionScheduler_Abstract_Schema.php @@ -13,17 +13,17 @@ abstract class ActionScheduler_Abstract_Schema { /** - * @var int Increment this value to trigger a schema update + * @var int Increment this value in derived class to trigger a schema update. */ protected $schema_version = 1; /** - * @var array Names of tables that will be registered by this class + * @var array Names of tables that will be registered by this class. */ protected $tables = []; /** - * Register tables with WordPress, and create them if needed + * Register tables with WordPress, and create them if needed. * * @return void */ diff --git a/classes/schema/ActionScheduler_LoggerSchema.php b/classes/schema/ActionScheduler_LoggerSchema.php index 90651d5f5..d19ae3f6c 100644 --- a/classes/schema/ActionScheduler_LoggerSchema.php +++ b/classes/schema/ActionScheduler_LoggerSchema.php @@ -10,7 +10,10 @@ class ActionScheduler_LoggerSchema extends ActionScheduler_Abstract_Schema { const LOG_TABLE = 'actionscheduler_logs'; - protected $schema_version = 1; + /** + * @var int Increment this value to trigger a schema update. + */ + protected $schema_version = 2; public function __construct() { $this->tables = [ diff --git a/classes/schema/ActionScheduler_StoreSchema.php b/classes/schema/ActionScheduler_StoreSchema.php index 44103bd37..b4a47f792 100644 --- a/classes/schema/ActionScheduler_StoreSchema.php +++ b/classes/schema/ActionScheduler_StoreSchema.php @@ -12,7 +12,10 @@ class ActionScheduler_StoreSchema extends ActionScheduler_Abstract_Schema { const CLAIMS_TABLE = 'actionscheduler_claims'; const GROUPS_TABLE = 'actionscheduler_groups'; - protected $schema_version = 1; + /** + * @var int Increment this value to trigger a schema update. + */ + protected $schema_version = 2; public function __construct() { $this->tables = [