- s/numeric/decimal
This commit is contained in:
parent
ad0f389870
commit
34fd97312f
@ -20,7 +20,7 @@ class Product extends Doctrine_Record
|
||||
public function setTableDefinition()
|
||||
{
|
||||
$this->hasColumn('id', 'integer', 4, 'primary');
|
||||
$this->hasColumn('price', 'numeric', 200, array('gt' => 0);
|
||||
$this->hasColumn('price', 'decimal', 18, array('gt' => 0);
|
||||
}
|
||||
}
|
||||
</code>
|
||||
|
@ -9,7 +9,7 @@ class Product extends Doctrine_Record
|
||||
{
|
||||
$this->hasColumn('id', 'integer', null, 'primary');
|
||||
$this->hasColumn('name', 'string');
|
||||
$this->hasColumn('price', 'numeric');
|
||||
$this->hasColumn('price', 'decimal', 18);
|
||||
}
|
||||
}
|
||||
</code>
|
||||
@ -48,4 +48,3 @@ CREATE TABLE orders (
|
||||
Now it is impossible to create orders with product_no entries that do not appear in the products table.
|
||||
|
||||
We say that in this situation the orders table is the referencing table and the products table is the referenced table. Similarly, there are referencing and referenced columns.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user