diff --git a/src/Maker/MakeEntity.php b/src/Maker/MakeEntity.php index e0498f36b..8e22f38d9 100644 --- a/src/Maker/MakeEntity.php +++ b/src/Maker/MakeEntity.php @@ -435,6 +435,8 @@ private function askForNextField(ConsoleStyle $io, array $fields, string $entity // set type according to user decision $classProperty->type = $io->confirm('Can this field store multiple enum values', false) ? 'simple_array' : 'string'; + } elseif ('integer' === $type) { + $classProperty->options['unsigned'] = $io->confirm('Is this an unsigned integer', false); } if ($io->confirm('Can this field be null in the database (nullable)', false)) { diff --git a/tests/Maker/MakeEntityTest.php b/tests/Maker/MakeEntityTest.php index cf72700ad..fe03d6a4a 100644 --- a/tests/Maker/MakeEntityTest.php +++ b/tests/Maker/MakeEntityTest.php @@ -194,6 +194,12 @@ public function getTestDetails(): \Generator '255', // length // nullable 'y', + 'rating', + 'integer', + // Unsigned + 'y', + // Nullable + 'y', 'createdAt', // use default datetime '',