Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5
cycle/schema-migrations-generator
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
By migration generator package you can automatically generate a set of migration files for Cycle ORM during schemacompilation. In this case, you have the freedom to alter such migrations manually before running them.
composer require cycle/schema-migrations-generator
useCycle\Migrations;useCycle\Schema\Registry;useCycle\Schema\Definition\Entity;useCycle\Database;useCycle\Database\Config;useCycle\Schema\Generator\Migrations\GenerateMigrations;$dbal =newDatabase\DatabaseManager(newConfig\DatabaseConfig(['default' =>'default','databases' => ['default' => ['connection' =>'sqlite' ] ],'connections' => ['sqlite' =>newConfig\SQLiteDriverConfig( connection:newConfig\SQLite\MemoryConnectionConfig(), queryCache:true, ), ]]));$migrator =newMigrations\Migrator($config,$dbal,newMigrations\FileRepository($config));$registry =newRegistry($dbal);$registry->register(....);$generator =newGenerateMigrations($migrator->getRepository(),$migrator->getConfig());
Migration generator creates set of migrations needed to sync database schema with desired state. Each database willreceive its own migration.
$generator->run($registry);
The MIT License (MIT). Please seeLICENSE for more information. MaintainedbySpiral Scout.
About
Migrations generator
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors8
Uh oh!
There was an error while loading.Please reload this page.
