Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Migrations generator

License

NotificationsYou must be signed in to change notification settings

cycle/schema-migrations-generator

Latest Stable VersionBuild StatusScrutinizer Code QualityCodecov

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.

Installation

composer require cycle/schema-migrations-generator

Configuration

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());

Running

Migration generator creates set of migrations needed to sync database schema with desired state. Each database willreceive its own migration.

$generator->run($registry);

License:

The MIT License (MIT). Please seeLICENSE for more information. MaintainedbySpiral Scout.

About

Migrations generator

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors8


[8]ページ先頭

©2009-2025 Movatter.jp