silverstripe-framework/tests/php/ORM/VersionedTest/WithIndexes.php

34 lines
700 B
PHP
Raw Normal View History

2016-10-14 03:30:05 +02:00
<?php
namespace SilverStripe\ORM\Tests\VersionedTest;
use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\Versioning\Versioned;
/**
* @mixin Versioned
*/
class WithIndexes extends DataObject implements TestOnly
{
private static $table_name = 'VersionedTest_WithIndexes';
2016-10-14 03:30:05 +02:00
private static $db = array(
'UniqA' => 'Int',
'UniqS' => 'Int',
);
2016-10-14 03:30:05 +02:00
private static $extensions = array(
Versioned::class
);
2016-10-14 03:30:05 +02:00
private static $indexes = [
'UniqS_idx' => 'unique ("UniqS")',
'UniqA_idx' => [
'type' => 'unique',
'name' => 'UniqA_idx',
'value' => '"UniqA"',
],
];
2016-10-14 03:30:05 +02:00
}