Add table declarations for tables with diff
This commit is contained in:
parent
8b18dcd54c
commit
453d4bcf48
@ -125,11 +125,11 @@ class ModelGenerator(object):
|
|||||||
|
|
||||||
def toUpgradeDowngradePython(self, indent=' '):
|
def toUpgradeDowngradePython(self, indent=' '):
|
||||||
''' Assume model is most current and database is out-of-date. '''
|
''' Assume model is most current and database is out-of-date. '''
|
||||||
|
|
||||||
decls = ['from migrate.changeset import schema',
|
decls = ['from migrate.changeset import schema',
|
||||||
'meta = MetaData(migrate_engine)']
|
'meta = MetaData(migrate_engine)']
|
||||||
for table in self.diff.tablesMissingInModel + \
|
for table in self.diff.tablesMissingInModel + \
|
||||||
self.diff.tablesMissingInDatabase:
|
self.diff.tablesMissingInDatabase + \
|
||||||
|
self.diff.tablesWithDiff:
|
||||||
decls.extend(self.getTableDefn(table))
|
decls.extend(self.getTableDefn(table))
|
||||||
|
|
||||||
upgradeCommands, downgradeCommands = [], []
|
upgradeCommands, downgradeCommands = [], []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user