1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/tests_old/models/MysqlIndexTestRecord.php

18 lines
560 B
PHP

<?php
class MysqlIndexTestRecord extends Doctrine_Entity
{
public static function initMetadata($class)
{
$class->setColumn('name', 'string', null);
$class->setColumn('code', 'integer', 4);
$class->setColumn('content', 'string', 4000);
$class->addIndex('content', array('fields' => 'content', 'type' => 'fulltext'));
$class->addIndex('namecode', array('fields' => array('name', 'code'),
'type' => 'unique'));
$class->setTableOption('type', 'MYISAM');
}
}