Download the PHP package basilicom/pimcore-plugin-migration-toolkit without Composer
On this page you can find all versions of the php package basilicom/pimcore-plugin-migration-toolkit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download basilicom/pimcore-plugin-migration-toolkit
More information about basilicom/pimcore-plugin-migration-toolkit
Files in basilicom/pimcore-plugin-migration-toolkit
Package pimcore-plugin-migration-toolkit
Short Description Set of Migration Helpers and further Migration Tools for Pimcore Migrations.
License GPL-3.0-or-later
Informations about the package pimcore-plugin-migration-toolkit
Pimcore Plugin Migration Toolkit
License: GPL v3
Version information
Bundle Version | PHP | Pimcore |
---|---|---|
^4.0 | ^7.4 | ^6.8 |
^4.0 | ^8.0 | ^10.0 |
^5.0 | ^8.1 | ^11.0 |
Why?
In every project we have migrations for the same things. Like Thumbnails, Classes, etc.
This plugin provides you with the migration helpers and further tools.
Usage Migration Helpers
For all migrations extend them from the class .
Migration Data
If a migration needs data it needs to be located in the following folder:
System Settings
System Settings can be set via config.yaml.
Example:
Language Settings
Language Settings are part of the System Settings and can be set via config.yaml.
Example:
Website Settings
Example: Up
Example: Down
Static Routes
Example: Up
Example: Down
User Roles
There is no way to remove the workspaces (dataobjects, documents or assets).
Even when deleting a user role in the pimcore backend the workspace data stays in the database.
Example: Up
Example: Down
Bundle / Extension
It is not possible to enable and install one bundle in one migration!
You need to make two migrations one with enable (disable) and one with install (uninstall) and then run it with the command Migrate in separate process. Otherwise it would not find the newly enabled bundle for the installation.
Example: Up
Example: Down
Class Definitions
Example: Up
Example: Down
Objectbricks
Example: Up
Example: Down
Fieldcollection
Example: Up
Example: Down
Classification Store
Classification Stores cannot be created with given ID.
But the ID is needed for the store field in a class.
Therefore using the name is needed.
But the name is not unique, so always use a unique name.
So be aware of that.
Example: Up
Example: Down
FieldDefinition Examples
Custom Layouts
Custom Layouts will get the id like "lower(
Example: Up
Example: Down
Document (Page)
Example: Up
Example: Down
Object (Folder)
Example: Up
Example: Down
Asset (File)
Example: Up
Example: Down
Asset (Folder)
Example: Up
Example: Down
QuantityValue Unit
Example: Up
Example: Down
MySQL Helper
Example: Up
to load and execute a large sql file, do the following:
all sql files should be stored in the sql
subdirectory within the migration's data directory:
Example: Down
please keep in mind the changed path in case of down migrations:
Translation Helper
to add the translations into the pimcore shared/admin translations. default domain is 'messages' (shared translations). but you can change it to any domain, also 'admin' (admin translations).
Example: Up
Example: Down
Commands
Migrate in separate process
Executes the same migrations as the command, but each one is run in a separate process, to prevent problems with PHP classes that changed during the runtime.
You're also able to migrate only specific bundles using the bundle prefix.
In some cases you might run migrations on large datasets. Therefor 120s of timeout per migration won't be enough.
To adapt the timeout just pass the --timeout
option. To unset the timeout at all, pass 0
.
Import Translations
To import a csv file, like the exported shared translations from pimcore. To Pimcore shared translations. Or to Pimcore admin translations.
Ideas
- command:
- types e.g:
- general migration for extended class only
- class migration template with folders
- ...
- types e.g:
- enhance command:
- to also revert or