mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
29 lines
672 B
PHP
29 lines
672 B
PHP
|
<?php
|
||
|
namespace SilverStripe\ORM\Tests\DataObjectSchemaTest;
|
||
|
|
||
|
use SilverStripe\Dev\TestOnly;
|
||
|
use SilverStripe\ORM\DataObject;
|
||
|
|
||
|
class AllIndexes extends DataObject implements TestOnly
|
||
|
{
|
||
|
private static $table_name = 'DataObjectSchemaTest_AllIndexes';
|
||
|
|
||
|
private static $db = [
|
||
|
'Title' => 'Varchar',
|
||
|
'Content' => 'Varchar',
|
||
|
'Number' => 'Int',
|
||
|
];
|
||
|
|
||
|
private static $indexes = [
|
||
|
'Content' => true,
|
||
|
'IndexCols' => ['Title', 'Content'],
|
||
|
'IndexUnique' => [
|
||
|
'type' => 'unique',
|
||
|
'columns' => ['Number'],
|
||
|
],
|
||
|
'IndexNormal' => [
|
||
|
'columns' => ['Title'],
|
||
|
],
|
||
|
];
|
||
|
}
|