mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
34 lines
733 B
PHP
34 lines
733 B
PHP
|
<?php
|
||
|
|
||
|
namespace SilverStripe\ORM\Tests\DataObjectSchemaGenerationTest;
|
||
|
|
||
|
use SilverStripe\Dev\TestOnly;
|
||
|
|
||
|
class TestIndexObject extends TestObject implements TestOnly
|
||
|
{
|
||
|
private static $table_name = 'DataObjectSchemaGenerationTest_IndexDO';
|
||
|
private static $db = array(
|
||
|
'Title' => 'Varchar(255)',
|
||
|
'Content' => 'Text'
|
||
|
);
|
||
|
|
||
|
private static $indexes = array(
|
||
|
'NameIndex' => 'unique ("Title")',
|
||
|
'SearchFields' => array(
|
||
|
'type' => 'fulltext',
|
||
|
'name' => 'SearchFields',
|
||
|
'value' => '"Title","Content"'
|
||
|
)
|
||
|
);
|
||
|
|
||
|
/** @config */
|
||
|
private static $indexes_alt = array(
|
||
|
'NameIndex' => array(
|
||
|
'type' => 'unique',
|
||
|
'name' => 'NameIndex',
|
||
|
'value' => '"Title"'
|
||
|
),
|
||
|
'SearchFields' => 'fulltext ("Title","Content")'
|
||
|
);
|
||
|
}
|