Skip to content

Commit 1aacb60

Browse files
authored
Merge pull request #21 from dsavina/feature/optional-index-name
Revert parameter `$indexName` for column method `unique`
2 parents 64d63f6 + e42a057 commit 1aacb60

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
],
1111
"require": {
1212
"php": ">=7.1",
13-
"thecodingmachine/dbal-fluid-schema-builder": "^1.6",
13+
"thecodingmachine/dbal-fluid-schema-builder": "^1.6.1",
1414
"doctrine/dbal": "^2.5"
1515
},
1616
"require-dev": {

src/TdbmFluidColumnOptions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ public function null(): self
5151
*
5252
* @return self
5353
*/
54-
public function unique(?string $indexName = null): self
54+
public function unique(): self
5555
{
56-
$this->fluidColumnOptions->unique($indexName);
56+
$this->fluidColumnOptions->unique();
5757
return $this;
5858
}
5959

tests/TdbmFluidColumnOptionsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public function testOptions()
2626
$columnOptions->notNull();
2727
$this->assertSame(true, $dbalColumn->getNotnull());
2828

29-
$columnOptions->unique('unique_foo');
30-
$this->assertSame(true, $posts->getDbalTable()->getIndex('unique_foo')->isUnique());
29+
$columnOptions->unique();
30+
$this->assertSame(true, $dbalColumn->getCustomSchemaOption('unique'));
3131

3232
$columnOptions->comment('foo');
3333
$this->assertSame('foo', $dbalColumn->getComment());

0 commit comments

Comments
 (0)