MichaelC wrote:
Many existing migrations scripts offer generation as generally the developer will apply db changes, then get it working how they want it, then create a migration.
This is more complicated, error prone and only covers transitions that are accounted for. Which means, this is also a reduction in functionality compared to what is currently possible.
Also generated migrations are less likely to break.
What would be an example of database updater "breaking"?
As for timestamp.php, how will this not work for more than 1 migration?
Which of the following files contain changes for pruning users?
1354877513.php
1354711242.php
1354308639.php
1354108598.php
1354748196.php
1354522012.php
1354375160.php
1354826681.php
1354836491.php
1354842171.php
1354091588.php
1354517488.php
1354325118.php
1354612444.php
1354208440.php
1354360076.php
1354479350.php
1354836279.php
1354581861.php
1354306151.php
1354314469.php
1354843508.php
1354114481.php
1354329646.php
1354675411.php
1354687288.php
1354570385.php
1354214827.php
1354868628.php
1354598616.php
1354126757.php
1354428804.php
1354499330.php
1354441865.php
1354815033.php
1354103679.php
1354857156.php
1354861770.php
1354916617.php
1354490787.php
Again, this is what existing migrations libs do
I am yet to see a migration library that uses timestamp only for identifying migrations. I would definitely be interested in seeing such a beast.
The only time I can imagine it would be acceptable is for write-only code, which phpbb is generally not.
and the only problem would be is when two migrations are made at the exact same second which is very unlikely but easy to resolve.
It's more likely than you think, because people copy paste. As a matter of fact, I would not use a timestamp, especially one with a second resolution, to uniquely identify anything.
They can be called their timestamps. I'm saying that instead of timestamp_name.php
and the class being timestamp_name
it should just be timestamp.php
and class being timestamp
.
Last time I checked 1354441865 was not a legal class name in php.