1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/tests_old/models/MysqlIndexTestRecord.php

18 lines
560 B
PHP
Raw Normal View History

<?php
class MysqlIndexTestRecord extends Doctrine_Record
{
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');
}
}