It's 'PRAGMA legacy_alter_table = ON' and the following change in
src:migrate (0.11.0 version) might do the trick.
@@ -9,6 +9,7 @@ except ImportError: # Python 2
from UserDict import DictMixin
from copy import copy
import re
+import sqlite3
from sqlalchemy.databases import sqlite as sa_base
from sqlalchemy.schema import ForeignKeyConstraint
@@ -96,6 +97,10 @@ class SQLiteHelper(SQLiteCommon):
if omit_constraints is None or cons.name not in omit_constraints
])
+ tup = sqlite3.sqlite_version_info
+ if tup[0] > 3 or (tup[0] == 3 and tup[1] >= 26):
+ self.append('PRAGMA legacy_alter_table = ON')
+ self.execute()
self.append('ALTER TABLE %s RENAME TO migration_tmp' % table_name)
self.execute()
@@ -106,6 +111,9 @@ class SQLiteHelper(SQLiteCommon):
self.execute()
self.append('DROP TABLE migration_tmp')
self.execute()
+ if tup[0] > 3 or (tup[0] == 3 and tup[1] >= 26):
+ self.append('PRAGMA legacy_alter_table = OFF')
+ self.execute()
def visit_column(self, delta):
if isinstance(delta, DictMixin):
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1807262
Title:
stein unit tests fail with sqlalchemy.exc.NoSuchTableError:
migration_tmp
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cinder/+bug/1807262/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs