Download the PHP package zenify/doctrine-migrations without Composer
On this page you can find all versions of the php package zenify/doctrine-migrations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zenify/doctrine-migrations
More information about zenify/doctrine-migrations
Files in zenify/doctrine-migrations
Package doctrine-migrations
Short Description Implementation of Doctrine Migrations to Nette
License MIT
Informations about the package doctrine-migrations
Doctrine Migrations
Implementation of Doctrine\Migrations to Nette.
Install
Register extensions in config.neon
:
Configuration
config.neon
with default values
Usage
Open your CLI and run command (based on Kdyby\Console
integration):
And then you should see all available commands:
Migrate changes to database
If you want to migrate existing migration to your database, just run migrate commmand:
If you get lost, just use -h
option for help:
Create new migration
To create new empty migration, just run:
A new empty migration will be created at your migrations directory. You can add your sql there then.
Migration that would add new role "superadmin"
to user_role
table would look like this:
Simple as that!
For further use, please check docs in Symfony bundle.
Features
Migrations organization
If you have over 100 migrations in one directory, it might get messy. Fortunately doctrine migrations can organize your migrations to directories by year or by year and month. You can configure it in your config.neon (see above).
Injected migrations
Note: this is not really best practise, so try to use it only if there is no other way.
Testing
Contributing
Rules are simple:
- new feature needs tests
- all tests must pass
- 1 feature per PR
We would be happy to merge your feature then!
All versions of doctrine-migrations with dependencies
arachne/event-dispatcher Version ^0.1
doctrine/migrations Version ^1.4
nette/di Version ^2.4
symfony/console Version ^3.1
symfony/event-dispatcher Version ^3.1