cakephp / phinx

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

Validate version int range #2248

Closed dereuromark closed 8 months ago

dereuromark commented 9 months ago

If people by accident add a

config/Migrations/202311128071500_Migration.php

instead of

config/Migrations/20231112807150_Migration.php

it actually works but is a date for in the future (year 20231 or sth^^). This messes up the "order".

Fair to say we would directly spot this if we would also display the actual date, not just the timstamp, in the migration output.

I propose we validate this range a bit more carefully. E.g. -10 years, +20years ?

Refs https://github.com/dereuromark/cakephp-queue/pull/392#issuecomment-1837282338