phpmig icon indicating copy to clipboard operation
phpmig copied to clipboard

Allow to change migration basename format

Open Arcesilas opened this issue 5 years ago • 0 comments

By default, the migration file basename is:

$basename = date('YmdHis') . '_' . $migrationName . '.php';

Could it be possible to allow to change this by providing a callback? For example, something like:

$callback = $this->container['phpmig.basename_callback'] ?? null;
$basename = $callback ? $callback($migrationName) : date('YmdHis') . '_' . $migrationName . '.php'

This sould not introduce BC break.

Arcesilas avatar Nov 05 '20 12:11 Arcesilas