Skip to content

Commit

Permalink
Fix identity attribute for auto increment fields
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Sep 22, 2023
1 parent fd9d315 commit 53f1b28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ private function getPhinxColumnOptionsNumeric(array $attributes, array $columnDa

// identity enable or disable automatic incrementing
if ($columnData['EXTRA'] === 'auto_increment') {
$attributes['identity'] = 'enable';
$attributes['identity'] = true;
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/diffs/MyNewMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function change()
->addColumn('id', 'integer', [
'null' => false,
'limit' => MysqlAdapter::INT_REGULAR,
'identity' => 'enable',
'identity' => true,
])
->create();
}
Expand Down

0 comments on commit 53f1b28

Please sign in to comment.