1
0
mirror of synced 2024-12-14 07:06:04 +03:00
doctrine2/manual/docs/Getting started - Setting table definition.php

17 lines
430 B
PHP
Raw Normal View History

<code type="php">
2006-07-24 01:08:06 +04:00
class Email extends Doctrine_Record {
public function setTableDefinition() {
/**
* email table has one column named 'address' which is
* php type 'string'
* maximum length 200
* database constraints: UNIQUE
* validators: email, unique
*
*/
$this->hasColumn("address","string",200,"email|unique");
}
}
</code>