1
0
mirror of synced 2025-02-06 15:29:26 +03:00

- s/numeric/decimal

This commit is contained in:
lsmith 2007-05-11 19:23:18 +00:00
parent ad0f389870
commit 34fd97312f
2 changed files with 11 additions and 12 deletions

View File

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

View File

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