Skip to content

Commit

Permalink
Use unsigned ints for id fields
Browse files Browse the repository at this point in the history
  • Loading branch information
apfelbox committed Jul 8, 2024
1 parent 7c6f290 commit da178db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

* (internal) Simplify types of `ArgumentBag`.
* (internal) Only ignore a single PHPStan issue for the container helper in `BaseController`.
* (improvement) Use unsigned `int`s for id fields in the database.


3.2.0
Expand Down
4 changes: 3 additions & 1 deletion src/Entity/EntityFieldsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ trait EntityFieldsTrait
*/
#[ORM\Id]
#[ORM\GeneratedValue(strategy: "AUTO")]
#[ORM\Column(name: "id", type: Types::INTEGER)]
#[ORM\Column(name: "id", type: Types::INTEGER, options: [
"unsigned" => true,
])]
private ?int $id = null;

/**
Expand Down

0 comments on commit da178db

Please sign in to comment.