diff --git a/src/Schema/SQLiteSchemaManager.php b/src/Schema/SQLiteSchemaManager.php index 0e7ede72a3..6c0523a90b 100644 --- a/src/Schema/SQLiteSchemaManager.php +++ b/src/Schema/SQLiteSchemaManager.php @@ -154,7 +154,7 @@ static function (array $a, array $b): int { if ($tableIndex['partial'] === 1) { $idx['where'] = $this->connection->fetchOne( <<<'SQL' - SELECT SUBSTR(sql, INSTR(sql, 'WHERE') + 6) + SELECT SUBSTR(sql, INSTR(lower(sql), 'where ') + LENGTH('where ')) FROM sqlite_master WHERE type = 'index' AND name = (?) SQL, [$keyName],