fond-of-oryx/propel-pre-migration

Propel Pre Migration Bundle

1.0.0 2023-09-12 14:55 UTC

This package is auto-updated.

Last update: 2024-04-12 16:22:06 UTC


README

CI license

Installation

composer require fond-of-oryx/propel-pre-migration

Configuration

Register PropelPreMigrationConsole in Pyz\Zed\Console\ConsoleDependencyProvider

Usage

The default command is ./vendor/bin/console propel-pre-migrate:migrate. On usage the command will check data/pre-migrations directory for *.sql files. Those files will be filtered for files with following naming #\d{4}\d{1,2}\d{1,2}_\d{1,3}.sql$# example: 20230908_01.sql and execute the filtered files. The filtering for name pattern could be overwritten in config with (GLOB_SQL_FILE_PATTERN_DEFAULT)

The file name of successfuly migrated files will be saved to table foo_propel_pre_migration in db. Files listed in this table will be ignored.

You can also execute single / specific files by name ./vendor/bin/console propel-pre-migrate:migrate -f file1.sql or ./vendor/bin/console propel-pre-migrate:migrate -f file1.sql,file2.sql,..fileN.sql