Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | public function autoIncrement() |
||
34 | { |
||
35 | if (count($this->columns) > 1) { |
||
36 | throw new SyntaxErrorException("Cannot make an auto incrementing composite key.", $this->home); |
||
37 | } |
||
38 | |||
39 | $this->getChangeLogger()->addAutoPrimaryKey( |
||
40 | \yentu\Parameters::wrap(array( |
||
41 | 'table' => $this->table->getName(), |
||
42 | 'schema' => $this->table->getSchema()->getName(), |
||
43 | 'column' => $this->columns[0] |
||
44 | ) |
||
45 | ) |
||
46 | ); |
||
47 | return $this; |
||
48 | } |
||
50 |