davedevelopment / phpmig

Simple migrations system for php
Other
568 stars 92 forks source link

Allow to change migration basename format #151

Open Arcesilas opened 4 years ago

Arcesilas commented 4 years ago

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.