File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public static function reorderTableColumns(Schema $schema): void
25
25
}
26
26
}
27
27
28
- private static function reorderColumnsForTable (Table $ table )
28
+ private static function reorderColumnsForTable (Table $ table ): void
29
29
{
30
30
$ columns = self ::getColumnsInExpectedOrder ($ table );
31
31
@@ -49,8 +49,9 @@ private static function reorderColumnsForTable(Table $table)
49
49
* @return Column[]
50
50
*/
51
51
private static function getColumnsInExpectedOrder (Table $ table ): array {
52
- if ($ table ->hasPrimaryKey ()) {
53
- $ pkColumns = $ table ->getPrimaryKey ()->getUnquotedColumns ();
52
+ $ primaryKey = $ table ->getPrimaryKey ();
53
+ if ($ primaryKey !== null ) {
54
+ $ pkColumns = $ primaryKey ->getUnquotedColumns ();
54
55
} else {
55
56
$ pkColumns = [];
56
57
}
You can’t perform that action at this time.
0 commit comments