3 ms·
> Every script must start with a integer which must be the next available integer. Based on experience you should not do 01_script_a.py, 02_script_b.py, ... Bu
by yoodenvranx 13y ago
> Every script must start with a integer which must be the next available integer.
Based on experience you should not do 01_script_a.py, 02_script_b.py, ... But rather do 010_, 020_, 030_, ... . This way you can squeeze in some initially unaccounted script in the correct location without renaming the others.
- Negitivefrags 13y agoIt's like BASIC all over again.
- anon4 13y agoAhaha! Glad I'm not the only one who thought that!
- troels 13y agoBetter yet, use timestamps. With a sequential identifier, you'll get problems in a distributed team real quick. Rails switched because of this.
- makmanalp 13y agoCheck out alembic's neat solution to this: http://alembic.readthedocs.org/en/latest/tutorial.html#working-with-branches http://alembic.readthedocs.org/en/latest/tutorial.html#worki... Basically you can solve the problem by fixing the order manually after merging code. And it won't run until you resolve the ordering.
- kelvin0 13y agoThat would seem like a good idea at first. However if your product is deployed to hundreds of customers each being at various versions of the DB, what happens? Ex: Customer A is at v10, customer B at v20 and customer C at v30. Then you decide for some reason that patch v11 needs to be deployed. What happens to Customers B and C? Do you create 2 new patch, i.e v11 and v40 which have similar changes?