mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
42 lines
979 B
PHP
42 lines
979 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 = [
|
|
'Title' => 'Varchar(192)',
|
|
'Content' => 'Text',
|
|
];
|
|
|
|
private static $indexes = [
|
|
'NameIndex' => [
|
|
'type' => 'unique',
|
|
'columns' => ['Title'],
|
|
],
|
|
'SearchFields' => [
|
|
'type' => 'fulltext',
|
|
'name' => 'SearchFields',
|
|
'columns' => ['Title', 'Content'],
|
|
],
|
|
];
|
|
|
|
/**
|
|
* @config
|
|
*/
|
|
private static $indexes_alt = [
|
|
'NameIndex' => [
|
|
'type' => 'unique',
|
|
'name' => 'NameIndex',
|
|
'columns' => ['Title'],
|
|
],
|
|
'SearchFields' => [
|
|
'type' => 'fulltext',
|
|
'columns' => ['Title', 'Content'],
|
|
],
|
|
];
|
|
}
|