Skip to content

decrease the amount of info being dumped when doing migrate, rollback or seed#863

Merged
markstory merged 1 commit into4.nextfrom
4.next-more-dense-console-output
Jul 2, 2025
Merged

decrease the amount of info being dumped when doing migrate, rollback or seed#863
markstory merged 1 commit into4.nextfrom
4.next-more-dense-console-output

Conversation

@LordSimal
Copy link
Copy Markdown
Contributor

@LordSimal LordSimal commented Jul 1, 2025

Resolves #862

Compared to what is linked in the issue this would now generate the following output (when no open migrations need to be applied):

bin/cake migrations migrate

All Done. Took 0.0140s
bin/cake migrations migrate -p AlfredDeploy

All Done. Took 0.0090s
bin/cake migrations migrate -p AlfredGoogle

All Done. Took 0.0109s
bin/cake migrations migrate -p AlfredDriversLogbook

All Done. Took 0.0105s
bin/cake migrations migrate -p AlfredEasybill

All Done. Took 0.0108s
bin/cake migrations migrate -p AlfredPublicTransport

All Done. Took 0.0094s
bin/cake migrations migrate -p AlfredStandBy

All Done. Took 0.0117s
bin/cake migrations migrate -p AlfredDashboard

All Done. Took 0.0089s
bin/cake migrations migrate -p AlfredDns

All Done. Took 0.0090s
bin/cake migrations migrate -p AlfredTools

All Done. Took 0.0085s
bin/cake migrations migrate -p AlfredMaintenances

All Done. Took 0.0090s
bin/cake migrations migrate -p AlfredDocumentations

All Done. Took 0.0091s
bin/cake migrations migrate -p AlfredMealOrders

All Done. Took 0.0096s
bin/cake migrations migrate -p AlfredStaffMembers

All Done. Took 0.0129s
bin/cake migrations migrate -p AlfredProjects

All Done. Took 0.0093s
bin/cake migrations migrate -p Queue

All Done. Took 0.0105s
bin/cake migrations migrate -p CakeDC/Users

All Done. Took 0.0119s

which is far more readable and to the point imho

Anyone who still wants/needs those verbose infos can simply add a -v to their command and get the same result as before.

@LordSimal LordSimal added this to the 4.x (CakePHP 5) milestone Jul 1, 2025
@LordSimal LordSimal changed the title decrease the amount of info being dumped when doing migrate, rollback or see decrease the amount of info being dumped when doing migrate, rollback or seed Jul 1, 2025
@dereuromark
Copy link
Copy Markdown
Member

the all done is grouped to the next command
IMO this should be separated by newline or alike too

bin/cake migrations migrate

All Done. Took 0.0140s
bin/cake migrations migrate -p AlfredDeploy

to

bin/cake migrations migrate

All Done. Took 0.0140s

bin/cake migrations migrate -p AlfredDeploy

etc

or even collapse the first two then if possible.

@LordSimal LordSimal force-pushed the 4.next-more-dense-console-output branch from 870fa5a to ac3037c Compare July 1, 2025 10:52
@LordSimal
Copy link
Copy Markdown
Contributor Author

LordSimal commented Jul 1, 2025

True, this is better

bin/cake migrations migrate
All Done. Took 0.0117s

bin/cake migrations migrate -p AlfredDeploy
All Done. Took 0.0096s

bin/cake migrations migrate -p AlfredGoogle
All Done. Took 0.0101s

If a migration is being applied it would look like this:

bin/cake migrations migrate

 == 20250701110936 Test: migrating 
 == 20250701110936 Test: migrated 0.0020s
All Done. Took 0.0174s

bin/cake migrations migrate -p AlfredDeploy
All Done. Took 0.0089s

@LordSimal
Copy link
Copy Markdown
Contributor Author

@markstory if you want I can adjust all the $io->out() method calls to use their equivalent named methods as well so we don't have to manually wrap everything in <error>, <comment> etc.

@markstory
Copy link
Copy Markdown
Member

if you want I can adjust all the $io->out() method calls to use their equivalent named methods as well so we don't have to manually wrap everything in , etc.

It looks like you got a bunch of them in these changes. If you have time to change the rest that would be greatly appreciated.

@markstory markstory merged commit 1156920 into 4.next Jul 2, 2025
23 of 26 checks passed
@markstory markstory deleted the 4.next-more-dense-console-output branch July 2, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants