Skip to content

Commit 421a569

Browse files
authored
add: compilePrimary function to src/Schema/Grammar.php (#52)
1 parent f908d91 commit 421a569

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Schema/Grammar.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,20 @@ public function __construct()
2525
$this->addSingleStoreModifiers();
2626
}
2727

28+
/**
29+
* Compile a primary key command.
30+
*
31+
* @param \Illuminate\Database\Schema\Blueprint $blueprint
32+
* @param \Illuminate\Support\Fluent $command
33+
* @return string
34+
*/
35+
public function compilePrimary(Blueprint $blueprint, Fluent $command)
36+
{
37+
$command->name(null);
38+
39+
return $this->compileKey($blueprint, $command, 'primary key');
40+
}
41+
2842
/**
2943
* Create the column definition for a spatial Geography type.
3044
*

0 commit comments

Comments
 (0)