]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
transactional_ddl flag for SQLite, MySQL dialects
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 4 Apr 2013 19:39:34 +0000 (15:39 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 4 Apr 2013 19:39:34 +0000 (15:39 -0400)
set to False.  MySQL doesn't support it,
SQLite does but current pysqlite driver does not.
#112

alembic/ddl/mysql.py
alembic/ddl/sqlite.py
docs/build/changelog.rst

index 1f04f2a5d31beb973a5f3b5a4878abb17bae9781..04d8473dd4a24b66376d2b1548fa2b02434b60f4 100644 (file)
@@ -10,6 +10,8 @@ from sqlalchemy import schema
 class MySQLImpl(DefaultImpl):
     __dialect__ = 'mysql'
 
+    transactional_ddl = False
+
     def alter_column(self, table_name, column_name,
                         nullable=None,
                         server_default=False,
index df92d960d856001ddb395ab43874ba42b9c4c408..b08e60f14bf9182c4e04d56b51313acd6d808fc7 100644 (file)
@@ -7,7 +7,11 @@ from alembic import util
 
 class SQLiteImpl(DefaultImpl):
     __dialect__ = 'sqlite'
-    transactional_ddl = True
+
+    transactional_ddl = False
+    """SQLite supports transactional DDL, but pysqlite does not:
+    see: http://bugs.python.org/issue10740
+    """
 
     def add_constraint(self, const):
         # attempt to distinguish between an
index eabb221224fd55b8b240f250dca7b5c712322aa2..f87deed30cbd160ef6e8b37509244cff63582779 100644 (file)
@@ -6,6 +6,14 @@ Changelog
 .. changelog::
     :version: 0.5.0
 
+    .. change::
+        :tags: bug
+        :tickets: 112
+
+      transactional_ddl flag for SQLite, MySQL dialects
+      set to False.  MySQL doesn't support it,
+      SQLite does but current pysqlite driver does not.
+
     .. change::
         :tags: feature
         :pullreq: 30