Download the PHP package genkgo/migrations without Composer
On this page you can find all versions of the php package genkgo/migrations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package migrations
Genkgo.Migrations
Library to make migrations easy.
Installation
Requires PHP 8.0 or later. It is installable and autoloadable via Composer as genkgo/migrations.
Quality
To run the unit tests at the command line, issue vendor/bin/phpunit -c phpunit.xml
. PHPUnit is required.
This library attempts to comply with PSR-1, PSR-2, and PSR-4. If you notice compliance oversights, please send a patch via pull request.
Getting Started
Create a migration file
Create a migration file, define how to update and undo the changes in your application.
Migrate
The adapter keeps the history of the already executed migrations. The current library comes with a MySQL and Sqlite adapter. To add a new adapter, create one yourself and issue a pull request. Set the adapter, create a new list (from a list of files in a directory) and execute.
Inject dependencies
You can inject your dependencies, e.g. some database abstraction layer like in the sample below.
And then use it the migration file.
The example below uses auto resolution of Aura.Di.
Multiple lists
You can have multiple migration lists, e.g. for each plugin one list. Just put the migration files in the right namespace. See example below.
And then migrate.
Contributing
- Found a bug? Please try to solve it yourself first and issue a pull request. If you are not able to fix it, at least give a clear description what goes wrong. We will have a look when there is time.
- Want to see a feature added, issue a pull request and see what happens. You could also file a bug of the missing feature and we can discuss how to implement it.
All versions of migrations with dependencies
ext-pdo Version *