SilverStripe\Snapshots\Migration\MigrationService
Synopsis
class MigrationService
{
- // members
- private $snapshotsTable;
- private $itemsTable;
- private array|null $classMap;
- private integer $baseID = 0;
- private string|null $baseClassSubquery;
- // methods
- public void __construct()
- public int migrate()
- public void seedRelationTracking()
- public array getClassesToMigrate()
- public void setup()
- public void tearDown()
- private int migrateSnapshots()
- private int migrateItems()
- private void createTemporaryTable()
- private void removeTemporaryTable()
- private array getClassMap()
- private void generateClassMap()
- private string sanitiseClassName()
- public void getBaseID()
Hierarchy
Uses
- SilverStripe\Core\Injector\Injectable
Members
private
- $baseClassSubquery — SilverStripe\Snapshots\Migration\string|null
- $baseID — int
- $classMap — SilverStripe\Snapshots\Migration\array|null
- $itemsTable — string
- $snapshotsTable — string
Methods
private
- createTemporaryTable()
- generateClassMap()
- getClassMap()
- migrateItems()
- migrateSnapshots()
- removeTemporaryTable()
- sanitiseClassName()
public
- __construct() — MigrationService constructor.
- getBaseID()
- getClassesToMigrate()
- migrate()
- seedRelationTracking() — For objects that have explicitly opted into relation tracking, we need to provide a placeholder SnapshotItem that they can refer to (even if it's orphaned), because implicit changes (checkboxes, elemental editor) don't necessarily create a new version for the owner
- setup() — Restart the task
- tearDown()