fix name error stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Thu, 24 Jun 2010 16:03:57 +0200
branchstable
changeset 5834 b8ad49864928
parent 5833 d7256ae7c1d1
child 5835 4125a8021956
fix name error
hooks/syncschema.py
--- a/hooks/syncschema.py	Thu Jun 24 15:59:17 2010 +0000
+++ b/hooks/syncschema.py	Thu Jun 24 16:03:57 2010 +0200
@@ -584,16 +584,16 @@
         if cstrtype == 'SizeConstraint':
             try:
                 adbh = self.session.pool.source('system').dbhelper
-                coltype = y2sql.type_from_constraints(adbh, rdef.object, [],
+                coltype = y2sql.type_from_constraints(adbh, self.rdef.object, [],
                                                       creating=False)
     
                 if getattr(adbh, 'alter_table_requires_cursor', False):
                     sql = adbh.sql_change_col_type(table, column, coltype,
-                                                   rdef.cardinality[0] != '1',
+                                                   self.rdef.cardinality[0] != '1',
                                                    self.session.system_sql)
                 else:
                     sql = adbh.sql_change_col_type(table, column, coltype,
-                                               rdef.cardinality[0] != '1')
+                                               self.rdef.cardinality[0] != '1')
                 
                 self.session.system_sql(sql, rollback_on_failure=False)
                 self.info('altered column %s of table %s: now %s',