diff --git a/CHANGELOG.md b/CHANGELOG.md index 03111fb9eab12fd4a1a14e4026114f2e4b8ee1f7..e07f23ec8b3aa3d34bad7c0c4b5d033c0a817cba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # WP Migrations Changelog +## [1.0.3] - 19-12-2022 +### Fixed +- Comparing migrations correctly installs newer version on fresh instance. + ## [1.0.2] - 12-12-2022 ### Fixed - Migration no longer iterates over all registered entries. Install only newest versions. diff --git a/src/WpdbMigrator.php b/src/WpdbMigrator.php index c3166e287f23522df3a830235e0ebe1e0ed39755..90ac5b52c20476d3b0f600e0f1aa2fdd5be56d8a 100644 --- a/src/WpdbMigrator.php +++ b/src/WpdbMigrator.php @@ -115,7 +115,7 @@ class WpdbMigrator implements Migrator { $this->comparator->compare( $migration->get_version(), $this->get_current_version() - ) === 1 + ) > 0 ) { $this->logger->info( sprintf( 'DB update %s:%s', $current_version, $migration->get_version() ) ); try {