← All changes
|
vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_LoggerSchema.php
+9
-6
1.5.3
→
trunk
View file →
| @@ -10,9 +10,13 @@ | ||
| 10 | 10 | class ActionScheduler_LoggerSchema extends ActionScheduler_Abstract_Schema { |
| 11 | 11 | const LOG_TABLE = 'actionscheduler_logs'; |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | - * @var int Increment this value to trigger a schema update. | |
| 14 | + * Schema version. | |
| 15 | + * | |
| 16 | + * Increment this value to trigger a schema update. | |
| 17 | + * | |
| 18 | + * @var int | |
| 15 | 19 | */ |
| 16 | 20 | protected $schema_version = 3; |
| 17 | 21 | |
| 18 | 22 | /** |
| @@ -18,11 +22,11 @@ | ||
| 18 | 22 | /** |
| 19 | 23 | * Construct. |
| 20 | 24 | */ |
| 21 | 25 | public function __construct() { |
| 22 | - $this->tables = [ | |
| 26 | + $this->tables = array( | |
| 23 | 27 | self::LOG_TABLE, |
| 24 | - ]; | |
| 28 | + ); | |
| 25 | 29 | } |
| 26 | 30 | |
| 27 | 31 | /** |
| 28 | 32 | * Performs additional setup work required to support this schema. |
| @@ -37,14 +41,13 @@ | ||
| 37 | 41 | * @param string $table Table name. |
| 38 | 42 | */ |
| 39 | 43 | protected function get_table_definition( $table ) { |
| 40 | 44 | global $wpdb; |
| 41 | - $table_name = $wpdb->$table; | |
| 42 | - $charset_collate = $wpdb->get_charset_collate(); | |
| 45 | + $table_name = $wpdb->$table; | |
| 46 | + $charset_collate = $wpdb->get_charset_collate(); | |
| 43 | 47 | switch ( $table ) { |
| 44 | 48 | |
| 45 | 49 | case self::LOG_TABLE: |
| 46 | - | |
| 47 | 50 | $default_date = ActionScheduler_StoreSchema::DEFAULT_DATE; |
| 48 | 51 | return "CREATE TABLE $table_name ( |
| 49 | 52 | log_id bigint(20) unsigned NOT NULL auto_increment, |
| 50 | 53 | action_id bigint(20) unsigned NOT NULL, |