byng / pimcore-doctrine-migrations-library
A library to add integration for Doctrine migrations in Pimcore.
Installs: 1 199
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=5.4.0
- doctrine/migrations: ^1.4
This package is not auto-updated.
Last update: 2024-11-09 19:56:22 UTC
README
In some Pimcore workflows you may find yourself repeatedly setting up the same content on several different environments (e.g. locally -> dev -> uat -> live). Doing this work manually is not only cumbersome, but it's also incredibly error prone. To alleviate this issue Byng decided to use Doctrine Migrations.
Using Doctrine Migrations you can automate database changes, and changes within Pimcore itself. For example; create pages, object, changing settings, etc.
Installation
Require the library via Composer (this library must be installed via Composer):
$ composer require byng/pimcore-doctrine-migrations-library
Then in your project's composer.json
file add the following snippets:
{
...
"config": {
"project-root-path": "./"
},
...
"scripts": {
"post-install-cmd": [
"Byng\\Pimcore\\DoctrineMigrations\\Installer::install"
],
"post-update-cmd": [
"Byng\\Pimcore\\DoctrineMigrations\\Installer::install"
]
}
...
}
The project root path is necessary so that the installer can create a migrations folder.
Note: The installation script will overwrite the migrations configuration files created in the project root. Changes to these files will be overwritten on composer install and update. We recommend placing them in your ignore file(s).
Usage
Once installed, you can simply use the library like you normally would with Doctrine Migrations. See their documentation here.
License
MIT