diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md
index 515f673..02d521b 100644
--- a/framework/CHANGELOG.md
+++ b/framework/CHANGELOG.md
@@ -174,6 +174,7 @@ Yii Framework 2 Change Log
 - Chg: Removed `yii\rest\ActiveController::$transactional` property and connected functionality (samdark)
 - Chg: Changed the default value of the `keyPrefix` property of cache components to be null (qiangxue)
 - Chg: Added `prefix` column to `yii\log\DbTarget` to have the same amount of information logged as in files and emails (cebe)
+- Chg: Use `limit(null)` instead of `limit(-1)` in migration controller to be compatible to more backends (cebe)
 - New #3911: Added `yii\behaviors\SluggableBehavior` that fills the specified model attribute with the transliterated and adjusted version to use in URLs (creocoder)
 
 
diff --git a/framework/console/controllers/BaseMigrateController.php b/framework/console/controllers/BaseMigrateController.php
index 85c1e6e..68015de 100644
--- a/framework/console/controllers/BaseMigrateController.php
+++ b/framework/console/controllers/BaseMigrateController.php
@@ -328,7 +328,7 @@ abstract class BaseMigrateController extends Controller
         }
 
         // try mark down
-        $migrations = array_keys($this->getMigrationHistory(-1));
+        $migrations = array_keys($this->getMigrationHistory(null));
         foreach ($migrations as $i => $migration) {
             if (strpos($migration, $version . '_') === 0) {
                 if ($i === 0) {
@@ -544,7 +544,7 @@ abstract class BaseMigrateController extends Controller
     protected function migrateToTime($time)
     {
         $count = 0;
-        $migrations = array_values($this->getMigrationHistory(-1));
+        $migrations = array_values($this->getMigrationHistory(null));
         while ($count < count($migrations) && $migrations[$count] > $time) {
             ++$count;
         }
@@ -575,7 +575,7 @@ abstract class BaseMigrateController extends Controller
         }
 
         // try migrate down
-        $migrations = array_keys($this->getMigrationHistory(-1));
+        $migrations = array_keys($this->getMigrationHistory(null));
         foreach ($migrations as $i => $migration) {
             if (strpos($migration, $version . '_') === 0) {
                 if ($i === 0) {
@@ -598,7 +598,7 @@ abstract class BaseMigrateController extends Controller
     protected function getNewMigrations()
     {
         $applied = [];
-        foreach ($this->getMigrationHistory(-1) as $version => $time) {
+        foreach ($this->getMigrationHistory(null) as $version => $time) {
             $applied[substr($version, 1, 13)] = true;
         }
 
@@ -621,7 +621,7 @@ abstract class BaseMigrateController extends Controller
 
     /**
      * Returns the migration history.
-     * @param integer $limit the maximum number of records in the history to be returned
+     * @param integer $limit the maximum number of records in the history to be returned. `null` for "no limit".
      * @return array the migration history
      */
     abstract protected function getMigrationHistory($limit);