equal
deleted
inserted
replaced
238 if fix: |
238 if fix: |
239 sql = 'UPDATE %s SET %s=NULL WHERE %s=%s;' % ( |
239 sql = 'UPDATE %s SET %s=NULL WHERE %s=%s;' % ( |
240 table, column, column, eid) |
240 table, column, column, eid) |
241 session.system_sql(sql) |
241 session.system_sql(sql) |
242 continue |
242 continue |
243 cursor = session.system_sql('SELECT eid_from FROM %s_relation;' % rschema) |
243 try: |
|
244 cursor = session.system_sql('SELECT eid_from FROM %s_relation;' % rschema) |
|
245 except Exception, ex: |
|
246 # usually because table doesn't exist |
|
247 print 'ERROR', ex |
|
248 continue |
244 for row in cursor.fetchall(): |
249 for row in cursor.fetchall(): |
245 eid = row[0] |
250 eid = row[0] |
246 if not has_eid(session, cursor, eid, eids): |
251 if not has_eid(session, cursor, eid, eids): |
247 bad_related_msg(rschema, 'subject', eid, fix) |
252 bad_related_msg(rschema, 'subject', eid, fix) |
248 if fix: |
253 if fix: |