dcardon / play-migrate

Database version migration module for use in the Play! framework
10 stars 2 forks source link

"Migrate collisions detected" when the label part of the patch file name contains the letters "up" #3

Closed oran-zz closed 13 years ago

oran-zz commented 14 years ago

Created patch files 28.up.myGroupPatch.sql and 28.down.myGroupPatch.sql Ran migrate:up

Received: Collision list: /home/server/db/migrate/incapsula_stage1/28.down.proxyGroupActivation.sql <==> /home/server/db/migrate/incapsula_stage1/28.up.proxyGroupActivation.sql

Seems like commands.py has a bug in line 135 - the regular expression pattern '/up.sql' is too weak. It catches the "up" part of the work "Group" in the filename 28.down.proxyGroupActivation.sql, which is a downgrade patch.

Should be changed to something stronger, like: r'/\d+.up*.sql'

dcardon commented 13 years ago

Thanks for catching this. I've fixed the issue in the latest release.

--Dave