We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d7c8c0 commit d0e497eCopy full SHA for d0e497e
src/Commands/MakeEntity.php
@@ -104,9 +104,10 @@ public function handle(): int
104
// Create Attributes
105
$attributes = '';
106
foreach ($columns as $_column) {
107
+ $defaultValue = ($_column->COLUMN_DEFAULT ?? 'null') ? ($_column->COLUMN_DEFAULT ?? 'null') : "''";
108
$attributes .= $this->writeAttribute(
109
$attributeStub,
- $_column->COLUMN_NAME,
110
+ $_column->COLUMN_NAME.($_column->IS_NULLABLE === 'YES' ? ' = '.$defaultValue : ''),
111
($_column->IS_NULLABLE === 'YES' ? 'null|' : '') . $this->dataTypes[$_column->DATA_TYPE]
112
);
113
}
0 commit comments