Skip to content

Commit ba7a4d4

Browse files
committed
Default as Not null fixed
1 parent 80e6705 commit ba7a4d4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"email": "[email protected]"
1010
}
1111
],
12-
"version": "0.0.19",
12+
"version": "0.0.20",
1313
"autoload": {
1414
"psr-4": {
1515
"MyDB\\": "src/"

src/Migration/MySQL/ColumnBuilder.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ private function getDataDescription(): string {
4949
if($this->nullable) {
5050
$columnDefinition[] = 'NULL';
5151
}
52+
else {
53+
$columnDefinition[] = 'NOT NULL';
54+
}
5255
if($this->primary) {
5356
$columnDefinition[] = 'PRIMARY KEY';
5457
}

0 commit comments

Comments
 (0)