fixes #106
This commit is contained in:
parent
c135f48fbf
commit
09a8867edd
@ -13,7 +13,10 @@ Fixed bugs
|
||||
******************
|
||||
|
||||
- updated tests for Python 2.7
|
||||
- repository keyword in :func:`api.version_control` can also be unicode
|
||||
- added if main condition for manage.py script
|
||||
- make :func:`migrate.changeset.constraint.ForeignKeyConstraint.autoname`
|
||||
work with SQLAlchemy 0.5 and 0.6
|
||||
- fixed case sensitivity in setup.py dependencies
|
||||
- moved :mod:`migrate.changeset.exceptions` and :mod:`migrate.versioning.exceptions`
|
||||
to :mod:`migrate.exceptions`
|
||||
|
@ -4,6 +4,7 @@
|
||||
import shutil
|
||||
import warnings
|
||||
import logging
|
||||
import inspect
|
||||
from StringIO import StringIO
|
||||
|
||||
import migrate
|
||||
@ -136,12 +137,12 @@ class PythonScript(base.BaseScript):
|
||||
funcname = base.operations[op]
|
||||
script_func = self._func(funcname)
|
||||
|
||||
try:
|
||||
script_func(engine)
|
||||
except TypeError:
|
||||
warnings.warn("upgrade/downgrade functions must accept engine"
|
||||
" parameter (since version > 0.5.4)", MigrateDeprecationWarning)
|
||||
raise
|
||||
# check for old way of using engine
|
||||
if not inspect.getargspec(script_func).args:
|
||||
raise TypeError("upgrade/downgrade functions must accept engine"
|
||||
" parameter (since version 0.5.4)")
|
||||
|
||||
script_func(engine)
|
||||
|
||||
@property
|
||||
def module(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user