Skip to content

Commit 1490a9e

Browse files
clovnriandg
authored andcommitted
SqliteDriver::getColumns() fix regexp for autoincrement recognition (#168)
1 parent ed1e816 commit 1490a9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Database/Drivers/SqliteDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public function getColumns(string $table): array
156156
$columns = [];
157157
foreach ($this->connection->query("PRAGMA table_info({$this->delimite($table)})") as $row) {
158158
$column = $row['name'];
159-
$pattern = "/(\"$column\"|\[$column\]|$column)\\s+[^,]+\\s+PRIMARY\\s+KEY\\s+AUTOINCREMENT/Ui";
159+
$pattern = "/(\"$column\"|`$column`|\[$column\]|$column)\\s+[^,]+\\s+PRIMARY\\s+KEY\\s+AUTOINCREMENT/Ui";
160160
$type = explode('(', $row['type']);
161161
$columns[] = [
162162
'name' => $column,

0 commit comments

Comments
 (0)