File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
tests/Schema/Driver/MySQL Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -140,11 +140,7 @@ public function render(AbstractColumn $column): void
140140
141141 if ($ this ->hasDefault () && $ this ->getDefault () !== null ) {
142142 $ column ->defaultValue ($ this ->getDefault ());
143- return ;
144- }
145-
146- if ($ this ->hasOption (self ::OPT_CAST_DEFAULT )) {
147- // cast default value
143+ } elseif ($ this ->hasOption (self ::OPT_CAST_DEFAULT )) {
148144 $ column ->defaultValue ($ this ->castDefault ($ column ));
149145 }
150146
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ public function testUnsignedColumnWithAdditionalAttributesAndDefault(): void
8686 $ this ->assertTrue ($ table ->hasColumn ('foo ' ));
8787 $ this ->assertArrayHasKey ('comment ' , $ table ->column ('foo ' )->getAttributes ());
8888 $ this ->assertArrayHasKey ('unsigned ' , $ table ->column ('foo ' )->getAttributes ());
89- $ this ->assertFalse ( $ table ->column ('foo ' )->getDefaultValue ());
89+ $ this ->assertSame ( 0 , $ table ->column ('foo ' )->getDefaultValue ());
9090 $ this ->assertSame ($ comment , $ table ->column ('foo ' )->getAttributes ()['comment ' ]);
9191 $ this ->assertSame ($ comment , $ table ->column ('foo ' )->getComment ());
9292 $ this ->assertTrue ($ table ->column ('foo ' )->getAttributes ()['unsigned ' ]);
You can’t perform that action at this time.
0 commit comments