cakephp / phinx

PHP Database Migrations for Everyone
https://phinx.org
MIT License
4.47k stars 889 forks source link

seed template #1507

Open m1kesk opened 5 years ago

m1kesk commented 5 years ago

For migration we can define custom template via config e.g.

    'templates' => [
        'file' => __DIR__ . '/src/Database/Migration/MyCustomTemplate.txt.dist'
    ],

I searched documentation and for seeders we use only default template from https://github.com/cakephp/phinx/blob/master/src/Phinx/Seed/Seed.template.php.dist

Question How can we define custom template for seeder in config?

This is probably feature-request

Thank you

treehousetim commented 5 years ago

I'd like to be able to do this from the CLI also.

igorsantos07 commented 3 years ago

One more on the line. In our case, it's because code style differs and we don't use auto-fixers, just lint warnings - thus, any newly generated file will need manual fixing before submission.

Bonus: didn't find in the docs there was a config for templates, just aliases. Quite useful.