2016-05-25 07:09:29 +02:00
|
|
|
<?php
|
|
|
|
|
2016-06-15 06:03:16 +02:00
|
|
|
namespace SilverStripe\ORM\Versioning;
|
|
|
|
|
2016-05-25 07:09:29 +02:00
|
|
|
/**
|
|
|
|
* Minimum level extra fields required by extensions that are versonable
|
|
|
|
*/
|
|
|
|
interface VersionableExtension {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Determine if the given table is versionable
|
|
|
|
*
|
|
|
|
* @param string $table
|
|
|
|
* @return bool True if versioned tables should be built for the given suffix
|
|
|
|
*/
|
|
|
|
public function isVersionedTable($table);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Update fields and indexes for the versonable suffix table
|
|
|
|
*
|
|
|
|
* @param string $suffix Table suffix being built
|
|
|
|
* @param array $fields List of fields in this model
|
|
|
|
* @param array $indexes List of indexes in this model
|
|
|
|
*/
|
|
|
|
public function updateVersionableFields($suffix, &$fields, &$indexes);
|
|
|
|
}
|