Skip to content
Browse files

Updated for 0.6.2

  • Loading branch information...
1 parent 4955dbb commit d94a5e9d22d19377ac88a34613775364c6efea81 @rockyburt rockyburt committed Aug 29, 2011
Showing with 10 additions and 5 deletions.
  1. +6 −0 CHANGES.rst
  2. +3 −4 khufu_script/db.py
  3. +1 −1 setup.py
View
6 CHANGES.rst
@@ -1,6 +1,12 @@
Changes
=======
+0.6.2 (Aug-29-2011)
+-------------------
+
+ * syncdb/upgradedb now reflect on the database more to avoid
+ circular model dependencies
+
0.6.1 (Jul-10-2011)
-------------------
View
7 khufu_script/db.py
@@ -87,8 +87,7 @@ def syncdb(self, table_names=['*'], remove=False):
self.logger.info('Accessing database: %s'
% settings['sqlalchemy.url'])
engine = self.manager._create_engine(settings['sqlalchemy.url'])
- dbmeta = self.manager._create_metadata()
- dbmeta.reflect(engine)
+ dbmeta = self.manager._create_metadata(reflect=True, bind=engine)
dbtables = dict(dbmeta.tables)
pending_to_add = []
@@ -116,7 +115,7 @@ def syncdb(self, table_names=['*'], remove=False):
pending_to_add += tables.values()
if len(pending_to_remove) > 0:
- dbmeta = self.manager._create_metadata()
+ dbmeta = self.manager._create_metadata(reflect=True, bind=engine)
tables = []
constraints = []
for table in pending_to_remove:
@@ -144,7 +143,7 @@ def syncdb(self, table_names=['*'], remove=False):
self.logger.info('removed %i tables' % len(pending_to_remove))
if len(pending_to_add) > 0:
- dbmeta = self.manager._create_metadata()
+ dbmeta = self.manager._create_metadata(reflect=True, bind=engine)
tables = [x.tometadata(dbmeta) for x in pending_to_add]
dbmeta.create_all(bind=engine, tables=tables)
self.logger.info('added %i tables' % len(pending_to_add))
View
2 setup.py
@@ -15,7 +15,7 @@
]
setup(name='khufu_script',
- version='0.6.1',
+ version='0.6.2',
description='Manage script support for Khufu/Pyramid apps',
long_description=README + '\n\n' + CHANGES,
classifiers=[

0 comments on commit d94a5e9

Please sign in to comment.
Something went wrong with that request. Please try again.