SQLAlchemy-migrate supports both python scripts and sql scripts to change the
schema. For the sql scripts, it is necessary to have the database or database
adaptor name within the name of the script.
The underscore '_' is used as a key word to separate the version, database name
and the operation. Durng parsing the script name by splitting it with '_', the
first part is taken as the version, and the last part s taken as the operation.
For the database name only one part before the last part is taken. This will
lead to an uncomplete database name. For example, if the database name is like
db_XXX_ap, the database from the parsing is only ap.
This issue is easy to resolve by modifying the code
dbms = parts[-2]
into
dbms = basename[len(version+'_'):][:-len('_'+op)]
in migrate/versioning/version.py.
Original issue reported on code.google.com by sb...@cn.ibm.com on 14 Jan 2013 at 7:53
Original issue reported on code.google.com by
sb...@cn.ibm.com
on 14 Jan 2013 at 7:53