silverstripe-framework/tests/php/ORM/DataObjectSchemaGenerationTest/TestIndexObject.php

42 lines
979 B
PHP
Raw Normal View History

2016-10-14 03:30:05 +02:00
<?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(255)',
'Content' => 'Text',
];
2016-10-14 03:30:05 +02:00
private static $indexes = [
'NameIndex' => [
'type' => 'unique',
'columns' => ['Title'],
],
'SearchFields' => [
'type' => 'fulltext',
'name' => 'SearchFields',
'columns' => ['Title', 'Content'],
],
];
2016-10-14 03:30:05 +02:00
/**
* @config
*/
private static $indexes_alt = [
'NameIndex' => [
'type' => 'unique',
'name' => 'NameIndex',
'columns' => ['Title'],
],
'SearchFields' => [
'type' => 'fulltext',
'columns' => ['Title', 'Content'],
],
];
2016-10-14 03:30:05 +02:00
}