1
0
mirror of synced 2025-01-31 04:21:44 +03:00

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

This commit is contained in:
zYne 2007-03-26 20:58:26 +00:00
parent 4865602ee7
commit 1104ae7017

View File

@ -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;