andreo/multiconn-doctrine-migrations-bundle

Doctrine migrations for multiple connections.

1.0.1 2022-11-23 17:56 UTC

This package is auto-updated.

Last update: 2024-10-23 22:19:25 UTC


README

This simple bundle provides basic doctrine migrations commands for the multiple connections

Config reference with default values

andreo_multi_conn_doctrine_migrations:
    table_storage:
        table_name: doctrine_migration_versions
        version_column_name: version
        version_column_length: 1024
        executed_at_column_name: executed_at
        execution_time_column_name: execution_time
    connections:
        foo: # doctrine connection name
            migrations_paths:
                'Migrations\Foo':  '%kernel.project_dir%/migrations/foo'
            all_or_nothing: false
            transactional: true
            check_database_platform: true
            dependency_factory_alias: null
            organize_migrations: none # one of: none, year, year_and_month

Commands

Example for foo connection name

bin/console andreo:multi-conn-doctrine-migrations:generate:foo # generate empty migrations

bin/console andreo:multi-conn-doctrine-migrations:migrate:foo # migrate

bin/console andreo:multi-conn-doctrine-migrations:execute:foo # execute one migration