Add table declarations for tables with diff

This commit is contained in:
Rick Copeland 2009-08-12 15:00:19 -04:00
parent 8b18dcd54c
commit 453d4bcf48

View File

@ -125,11 +125,11 @@ class ModelGenerator(object):
def toUpgradeDowngradePython(self, indent=' '):
''' Assume model is most current and database is out-of-date. '''
decls = ['from migrate.changeset import schema',
'meta = MetaData(migrate_engine)']
for table in self.diff.tablesMissingInModel + \
self.diff.tablesMissingInDatabase:
self.diff.tablesMissingInDatabase + \
self.diff.tablesWithDiff:
decls.extend(self.getTableDefn(table))
upgradeCommands, downgradeCommands = [], []