Show More
@@ -12,7 +12,7 b' from sqlalchemy.schema import UniqueCons' | |||
|
12 | 12 | |
|
13 | 13 | from rhodecode.lib.dbmigrate.migrate import exceptions |
|
14 | 14 | from rhodecode.lib.dbmigrate.migrate.changeset import ansisql |
|
15 | ||
|
15 | import sqlite3 | |
|
16 | 16 | |
|
17 | 17 | SQLiteSchemaGenerator = sa_base.SQLiteDDLCompiler |
|
18 | 18 | |
@@ -73,10 +73,16 b' class SQLiteHelper(SQLiteCommon):' | |||
|
73 | 73 | cons for cons in table.constraints |
|
74 | 74 | if omit_uniques is None or cons.name not in omit_uniques |
|
75 | 75 | ]) |
|
76 | tup = sqlite3.sqlite_version_info | |
|
77 | if tup[0] > 3 or (tup[0] == 3 and tup[1] >= 26): | |
|
78 | self.append('PRAGMA legacy_alter_table = ON') | |
|
79 | self.execute() | |
|
76 | 80 | |
|
77 | 81 | self.append('ALTER TABLE %s RENAME TO migration_tmp' % table_name) |
|
78 | 82 | self.execute() |
|
79 | ||
|
83 | if tup[0] > 3 or (tup[0] == 3 and tup[1] >= 26): | |
|
84 | self.append('PRAGMA legacy_alter_table = OFF') | |
|
85 | self.execute() | |
|
80 | 86 | insertion_string = self._modify_table(table, column, delta) |
|
81 | 87 | |
|
82 | 88 | table.create(bind=self.connection) |
General Comments 0
You need to be logged in to leave comments.
Login now