forked from michaeldyrynda/laravel-efficient-uuid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request michaeldyrynda#13 from michaeldyrynda/feature/sepa…
…rate-field-type Separate field type
- Loading branch information
Showing
10 changed files
with
69 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
{ | ||
"name": "dyrynda/laravel-efficient-uuid", | ||
"description": "A package to override Laravel migrations to more efficiently store UUID fields in your database", | ||
"type": "utility", | ||
"description": "A package to extend Laravel migrations adding a more efficient storage of UUID fields in your database", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Michael Dyrynda", | ||
"email": "[email protected]", | ||
"homepage": "https://dyrynda.com.au" | ||
} | ||
], | ||
"require": { | ||
"php": "^7.2", | ||
"illuminate/container": "^6.0", | ||
"illuminate/database": "^6.0" | ||
"illuminate/database": "^6.0", | ||
"orchestra/testbench": "^4.0" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^8.0", | ||
|
@@ -21,13 +30,5 @@ | |
"Tests\\": "tests/" | ||
} | ||
}, | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Michael Dyrynda", | ||
"email": "[email protected]", | ||
"homepage": "https://dyrynda.com.au" | ||
} | ||
], | ||
"minimum-stability": "stable" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace Tests; | ||
|
||
use Mockery as m; | ||
use Illuminate\Database\Connection; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Dyrynda\Database\Schema\Grammars\MySqlGrammar; | ||
|
||
class DatabaseMySqlSchemaGrammarTest extends TestCase | ||
{ | ||
public function tearDown(): void | ||
{ | ||
m::close(); | ||
} | ||
|
||
public function testAddingUuid() | ||
{ | ||
$blueprint = new Blueprint('users', function ($table) { | ||
$table->uuid('foo'); | ||
$table->efficientUuid('bar'); | ||
}); | ||
|
||
$connection = m::mock(Connection::class); | ||
|
||
$this->assertEquals( | ||
['alter table `users` add `foo` char(36) not null, add `bar` binary(16) not null'], | ||
$blueprint->toSql($connection, new MySqlGrammar) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace Tests; | ||
|
||
use Dyrynda\Database\LaravelEfficientUuidServiceProvider; | ||
|
||
class TestCase extends \Orchestra\Testbench\TestCase | ||
{ | ||
protected function getPackageProviders($app) | ||
{ | ||
return [ | ||
LaravelEfficientUuidServiceProvider::class, | ||
]; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.