Skip to content

Commit

Permalink
Update release 4.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
balexey88 committed Oct 18, 2024
1 parent 1fda323 commit 9bb6eb9
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* COMPATIBILITY - Easy Digital Downloads Compatibility replaced with [WP-Stateless - Easy Digital Downloads Addon](* COMPATIBILITY - Easy Digital Downloads Compatibility replaced with [WP-Stateless - Easy Digital Downloads Addon](https://wordpress.org/plugins/wp-stateless-easy-digital-downloads-addon/).
* COMPATIBILITY - LiteSpeed Cache Compatibility replaced with [WP-Stateless - LiteSpeed Cache Addon](https://wordpress.org/plugins/wp-stateless-litespeed-cache-addon/).
* FIX: remove PHP warning on `Status` settings tab.
* FIX: database updates to resolve conflicts with Polylang Pro compatibility.

= 4.1.1 =
* FIX - cache issues during Data Optimization.
Expand Down
2 changes: 1 addition & 1 deletion changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* COMPATIBILITY - Easy Digital Downloads Compatibility replaced with [WP-Stateless - Easy Digital Downloads Addon](https://wordpress.org/plugins/wp-stateless-easy-digital-downloads-addon/).
* COMPATIBILITY - LiteSpeed Cache Compatibility replaced with [WP-Stateless - LiteSpeed Cache Addon](https://wordpress.org/plugins/wp-stateless-litespeed-cache-addon/).
* FIX: PHP warning on `Status` settings tab.

* FIX: database updates to resolve conflicts with Polylang Pro compatibility.

#### 4.1.1
* FIX - cache issues during Data Optimization.
Expand Down
5 changes: 3 additions & 2 deletions lib/classes/class-db.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DB {
use Singleton;

const DB_VERSION_KEY = 'sm_db_version';
const DB_VERSION = '1.1';
const DB_VERSION = '1.2';
const FULL_SIZE = '__full';

/**
Expand Down Expand Up @@ -173,7 +173,8 @@ public function create_db() {
`status` varchar(10) NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY post_id (post_id),
UNIQUE KEY `name` (`name`(191))
KEY `name` (`name`(191)),
UNIQUE KEY post_id_name (post_id, `name`(150))
) $charset_collate;
CREATE TABLE $this->file_sizes (
Expand Down
10 changes: 10 additions & 0 deletions lib/classes/class-upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,16 @@ public static function upgrade_db($new_version, $old_version) {
Helper::log($e->getMessage());
}
}

if ( !empty($old_version) && version_compare($old_version, '1.2', '<') ) {
try {
// Remove UNIQUE indexes, which will be recreated later using dbDelta as non-unique
$wpdb->query('ALTER TABLE ' . ud_stateless_db()->files . ' DROP INDEX name');

} catch (\Throwable $e) {
Helper::log($e->getMessage());
}
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ Before upgrading to WP-Stateless 3.0, please, make sure you tested it on your de
* COMPATIBILITY - Easy Digital Downloads Compatibility replaced with [WP-Stateless - Easy Digital Downloads Addon](* COMPATIBILITY - Easy Digital Downloads Compatibility replaced with [WP-Stateless - Easy Digital Downloads Addon](https://wordpress.org/plugins/wp-stateless-easy-digital-downloads-addon/).
* COMPATIBILITY - LiteSpeed Cache Compatibility replaced with [WP-Stateless - LiteSpeed Cache Addon](https://wordpress.org/plugins/wp-stateless-litespeed-cache-addon/).
* FIX: remove PHP warning on `Status` settings tab.
* FIX: database updates to resolve conflicts with Polylang Pro compatibility.

= 4.1.1 =
* FIX - cache issues during Data Optimization.
Expand Down
4 changes: 0 additions & 4 deletions static/views/status-sections/migrations.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
<a href="#" class="button button-primary resume" data-action="resume"><?php _e('Resume Data Optimization', ud_get_stateless_media()->domain); ?></a>
</div>

<?php if ( isset( $migration['message'] ) ) : ?>
<p class="description"><?php echo $migration['message']; ?></p>
<?php endif; ?>

<div class="progress-wrap">
<div class="progress"><div class="bar"></div><span class="percent"></span></div>
</div>
Expand Down

0 comments on commit 9bb6eb9

Please sign in to comment.