Seeder Log and Prevent/Allow duplicate execution
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 4.5k
- Forks
- 884
- PR merge metrics
- No merged PRs in 30d
Description
Hi there, maybe I didn't get something, but here my thoughts worth 5 cents:
Execution of Migrations Scripts are logged into phinxlog, and can be queried from command line with "phinx status". So track of execution is easy and duplicate execution is prevented. A really great thing!
I'm missing a bit that kind of control for the the seeders... I'm not a phinx crack, and to be honest, this tool is quite new for me, so maybe I'm missing somehting here (but couldn't find it in the docs).
Would it not be great to have also a log (and the possibility to query it with a status command from command line) for the seed executions?
Also it would be quite handy to have a property inside the seeder class to prevent or allow duplicate executions.
Of course you could add this functionallity into the each seeder itself (to write some stuff about its execution into a log table, and then later query that table to check if it was already executed), but I feel like a generic approach without a homebrew hack for this would be better...
any thoughts?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing how seeders currently execute and how migration status is exposed through the phinx status command and phinxlog table. Define the expected seed execution log, status output, and per-seeder duplicate-execution behavior; the work is done when those requirements are implemented and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100