File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -173,4 +173,19 @@ public function testBoolDefault(): void
173173
174174 $ db ->close ();
175175 }
176+
177+ public function testNegativeDefaultValues ()
178+ {
179+ $ db = $ this ->getConnection (true );
180+
181+ $ schema = $ db ->getSchema ();
182+ $ tableSchema = $ schema ->getTableSchema ('negative_default_values ' );
183+
184+ $ this ->assertSame (-123 , $ tableSchema ->getColumn ('tinyint_col ' )->getDefaultValue ());
185+ $ this ->assertSame (-123 , $ tableSchema ->getColumn ('smallint_col ' )->getDefaultValue ());
186+ $ this ->assertSame (-123 , $ tableSchema ->getColumn ('int_col ' )->getDefaultValue ());
187+ $ this ->assertSame (-123 , $ tableSchema ->getColumn ('bigint_col ' )->getDefaultValue ());
188+ $ this ->assertSame (-12345.6789 , $ tableSchema ->getColumn ('float_col ' )->getDefaultValue ());
189+ $ this ->assertSame (-33.22 , $ tableSchema ->getColumn ('numeric_col ' )->getDefaultValue ());
190+ }
176191}
You can’t perform that action at this time.
0 commit comments