Download the PHP package symplify/doctrine-migrations without Composer
On this page you can find all versions of the php package symplify/doctrine-migrations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download symplify/doctrine-migrations
More information about symplify/doctrine-migrations
Files in symplify/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.
Contributing
Send issue or pull-request to main repository.
All versions of doctrine-migrations with dependencies
symplify/symfony-event-dispatcher Version ^1.4.0
doctrine/migrations Version ^1.4
nette/di Version ^2.4
symfony/console Version ^3.2
symfony/event-dispatcher Version ^3.2
symplify/package-builder Version ^1.4