root/branches/0.9/models/CheckConstraintTest.php

Revision 2353, 308 bytes (checked in by meus, 16 months ago)

moved all models to trunk/models. removed some old invalid testcases

Line 
1<?php
2class CheckConstraintTest extends Doctrine_Record
3{
4    public function setTableDefinition()
5    {
6        $this->hasColumn('price', 'decimal', 2, array('max' => 5000, 'min' => 100));
7        $this->hasColumn('discounted_price', 'decimal', 2);
8        $this->check('price > discounted_price');
9    }
10}
Note: See TracBrowser for help on using the browser.