Skip to content

Commit

Permalink
Catch this invalid use case.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Nov 17, 2014
1 parent 435cf86 commit 4448f17
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions framework/Db/lib/Horde/Db/Adapter/Base/TableDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ public function primaryKey($name)
*/
public function column($name, $type, $options = array())
{
if ($name == $this->_primaryKey) {
throw new LogicException($name . ' has already been added as a primary key');
}

$options = array_merge(
array('limit' => null,
'precision' => null,
Expand Down

0 comments on commit 4448f17

Please sign in to comment.