Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Maker/MakeEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
6 changes: 6 additions & 0 deletions tests/Maker/MakeEntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ public function getTestDetails(): \Generator
'255', // length
// nullable
'y',
'rating',
'integer',
// Unsigned
'y',
// Nullable
'y',
'createdAt',
// use default datetime
'',
Expand Down