diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-10-15 00:07:06 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-10-15 00:07:06 +0000 |
commit | 7e5e985c0e17a2d300f9aa8633c3610db600f2e2 (patch) | |
tree | 553780288c3fc75697d1558187c85f09a9cb42ed /lib/sqlalchemy/engine/base.py | |
parent | 6b40f50b87a03172d77abf0e50f42b565f416645 (diff) | |
download | sqlalchemy-7e5e985c0e17a2d300f9aa8633c3610db600f2e2.tar.gz |
- ForeignKey(Constraint) supports "use_alter=True", to create/drop a foreign key
via ALTER. this allows circular foreign key relationships to be set up.
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
-rw-r--r-- | lib/sqlalchemy/engine/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 4ba5e1115..83db06090 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -225,7 +225,7 @@ class Connection(Connectable): """when no Transaction is present, this is called after executions to provide "autocommit" behavior.""" # TODO: have the dialect determine if autocommit can be set on the connection directly without this # extra step - if not self.in_transaction() and re.match(r'UPDATE|INSERT|CREATE|DELETE|DROP', statement.lstrip().upper()): + if not self.in_transaction() and re.match(r'UPDATE|INSERT|CREATE|DELETE|DROP|ALTER', statement.lstrip().upper()): self._commit_impl() def _autorollback(self): if not self.in_transaction(): |