8000 bump schema and plugin versions by rrennick · Pull Request #415 · woocommerce/action-scheduler · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bump schema and plugin versions #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions action-scheduler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand All @@ -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();
}
Expand Down
6 changes: 3 additions & 3 deletions classes/abstracts/ActionScheduler_Abstract_Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
5 changes: 4 additions & 1 deletion classes/schema/ActionScheduler_LoggerSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
5 changes: 4 additions & 1 deletion classes/schema/ActionScheduler_StoreSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
0