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