Skip to content

Commit 0159fae

Browse files
authored
Merge pull request #11 from moufmouf/1.1
Adding support for @autoincrement annotation
2 parents 7216850 + e1c3d76 commit 0159fae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/SchemaAnalyzer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ public function isJunctionTable(Table $table, $ignoreReferencedTables = false)
168168
}
169169

170170
// Let's check that the primary key is autoincremented
171-
if (!$table->getColumn($pkColumns[0])->getAutoincrement()) {
171+
$pkColumn = $table->getColumn($pkColumns[0]);
172+
if (!$pkColumn->getAutoincrement() && strpos($pkColumn->getComment(), '@Autoincrement') === false) {
172173
return false;
173174
}
174175
}

0 commit comments

Comments
 (0)