Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 555bbbd

Browse files
committed
Merge doubles.
2 parents c25a47f + 68c87c9 commit 555bbbd

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

src/Illuminate/Database/Schema/Blueprint.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,6 @@ public function float($column, $total = 8, $places = 2)
514514
* @param int|null $total
515515
* @param int|null $places
516516
* @return \Illuminate\Support\Fluent
517-
*
518517
*/
519518
public function double($column, $total = null, $places = null)
520519
{

tests/Database/DatabaseMySqlSchemaGrammarTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,17 @@ public function testAddingDouble()
383383
}
384384

385385

386+
public function testAddingDoubleSpecifyingPrecision()
387+
{
388+
$blueprint = new Blueprint('users');
389+
$blueprint->double('foo', 15, 8);
390+
$statements = $blueprint->toSql($this->getConnection(), $this->getGrammar());
391+
392+
$this->assertEquals(1, count($statements));
393+
$this->assertEquals('alter table `users` add `foo` double(15, 8) not null', $statements[0]);
394+
}
395+
396+
386397
public function testAddingDecimal()
387398
{
388399
$blueprint = new Blueprint('users');

0 commit comments

Comments
 (0)