File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,9 @@ public function null(): FluidColumnOptions
5858 *
5959 * @return FluidColumnOptions
6060 */
61- public function unique (? string $ indexName = null ): FluidColumnOptions
61+ public function unique (): FluidColumnOptions
6262 {
63- $ this ->fluidTable -> unique ([ $ this -> namingStrategy -> quoteIdentifier ( $ this -> column ->getName ())], $ indexName );
63+ $ this ->column ->setCustomSchemaOption ( ' unique ' , true );
6464 return $ this ;
6565 }
6666
Original file line number Diff line number Diff 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 ());
You can’t perform that action at this time.
0 commit comments