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

18 lines
560 B
PHP
Raw Normal View History

<?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');
}
}