43
44
'routerl3agentbindings_ibfk_1'}}
47
48
# In order to sanitize the data during migration,
48
49
# the current records in the table need to be verified
49
50
# and all the duplicate records which violate the PK
50
51
# constraint need to be removed.
51
52
context = op.get_context()
53
54
op.execute('DELETE FROM %(table)s WHERE id in ('
54
55
'SELECT %(table)s.id FROM %(table)s LEFT OUTER JOIN '
55
56
'(SELECT MIN(id) as id, router_id, l3_agent_id '