(self, dst_db)
Restore fkeys that have both tables on sync.
Restore fkeys that have both tables on sync.
Restore fkeys that have both tables on sync .
def restore_fkeys(self, dst_db):
        """Restore fkeys that have both tables on sync."""
        dst_curs = dst_db.cursor()
        # restore fkeys -- one at a time
        q = "select * from londiste.get_valid_pending_fkeys(%s)"
        dst_curs.execute(q, [self.set_name])
        fkey_list = dst_curs.fetchall()
        for row in fkey_list:
            self.log.info('Creating fkey: %(fkey_name)s (%(from_table)s --> %(to_table)s)' % row)
            q2 = "select londiste.restore_table_fkey(%(from_table)s, %(fkey_name)s)"
            dst_curs.execute(q2, row)
            dst_db.commit()
def restore_fkeys ( self , dst_db ) : dst_curs = dst_db . cursor ( ) # restore fkeys -- one at a time q = "select * from londiste.get_valid_pending_fkeys(%s)" dst_curs . execute ( q , [ self . set_name ] ) fkey_list = dst_curs . fetchall ( ) for row in fkey_list : self . log . info ( 'Creating fkey: %(fkey_name)s (%(from_table)s --> %(to_table)s)' % row ) q2 = "select londiste.restore_table_fkey(%(from_table)s, %(fkey_name)s)" dst_curs . execute ( q2 , row ) dst_db . commit ( )