43 protected string $from =
'fsv1';
44 protected string $to =
'fsv2';
48 return \ilStorageHandlerV1Migration::class;
62 new \ilIniFilesLoadedObjective(),
63 new \ilDatabaseUpdatedObjective(),
70 $ilias_ini = $environment->
getResource(Environment::RESOURCE_ILIAS_INI);
73 $data_dir = $ilias_ini->readVariable(
'clients',
'datadir');
76 $configuration =
new LocalConfig(
"{$data_dir}/{$client_id}");
78 $filesystem =
$f->getLocal($configuration);
80 $this->database = $environment->
getResource(Environment::RESOURCE_DATABASE);
96 $container[
'filesystem.storage'] = $filesystem;
98 $this->resource_builder = $init->getResourceBuilder(
$container);
102 $this->resource_builder,
111 $io = $environment->
getResource(Environment::RESOURCE_ADMIN_INTERACTION);
113 $r = $this->database->queryF(
114 "SELECT rid FROM il_resource WHERE storage_id = %s LIMIT 1",
118 $d = $this->database->fetchObject($r);
121 if (!$this->migrator->migrate($resource, $this->to)) {
122 $i = $resource->getIdentification()->serialize();
124 'Resource ' .
$i .
' not migrated, file not found. All Stakeholder have been informed about the deletion.'
132 $r = $this->database->queryF(
133 "SELECT COUNT(rid) as old_storage FROM il_resource WHERE storage_id != %s",
137 $d = $this->database->fetchObject($r);
139 return (
int)(
$d->old_storage ?? 0);
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Customizing of pimple-DIC for ILIAS.
Class FlySystemFilesystemFactory.
Class ResourceIdentification.
Wrapper around symfonies input and output facilities to provide just the functionality required for t...
Responsible for loading the Resource Storage into the dependency injection container of ILIAS.
Class ilStorageContainersExistingObjective.
Class ilStorageHandlerV1Migration.
getDefaultAmountOfStepsPerRun()
Tell the default amount of steps to be executed for one run of the migration.
ILIAS ResourceStorage StorageHandler Migrator $migrator
getRemainingAmountOfSteps()
Count up how many "things" need to be migrated.
DirectoryIterator $iterator
getPreconditions(Environment $environment)
ILIAS ResourceStorage Resource ResourceBuilder $resource_builder
prepare(Environment $environment)
Prepare the migration by means of some environment.
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
An environment holds resources to be used in the setup process.
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
A migration is a potentially long lasting operation that can be broken into discrete steps.
step(Environment $environment)
Run one step of the migration.