Commit 1104ae70 authored by zYne's avatar zYne

primary keys now unsigned by default, primary keys no longer used as foreign keys

parent 4865602e
......@@ -228,7 +228,8 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
array('integer',
20,
array('autoincrement' => true,
'primary' => true
'primary' => true,
'unsigned' => true,
)
)
), $this->columns);
......@@ -367,6 +368,10 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
$fk = $relation->toArray();
$fk['foreignTable'] = $relation->getTable()->getTableName();
if ($relation->getTable() === $this && in_array($relation->getLocal(), $primary)) {
continue;
}
if ($relation->hasConstraint()) {
$options['foreignKeys'][] = $fk;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment