Skip to content

Commit

Permalink
SqliteDriver::getColumns() fix regexp for autoincrement recognition (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
clovnrian authored and dg committed May 18, 2017
1 parent ed1e816 commit 1490a9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database/Drivers/SqliteDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function getColumns(string $table): array
$columns = [];
foreach ($this->connection->query("PRAGMA table_info({$this->delimite($table)})") as $row) {
$column = $row['name'];
$pattern = "/(\"$column\"|\[$column\]|$column)\\s+[^,]+\\s+PRIMARY\\s+KEY\\s+AUTOINCREMENT/Ui";
$pattern = "/(\"$column\"|`$column`|\[$column\]|$column)\\s+[^,]+\\s+PRIMARY\\s+KEY\\s+AUTOINCREMENT/Ui";
$type = explode('(', $row['type']);
$columns[] = [
'name' => $column,
Expand Down

0 comments on commit 1490a9e

Please sign in to comment.