

def _pre_upgrade_273(self, engine):
    if (engine.name != 'sqlite'):
        return
    for (table_name, constraint_name) in [('compute_nodes', 'uniq_compute_nodes0host0hypervisor_hostname'), ('fixed_ips', 'uniq_fixed_ips0address0deleted'), ('instance_info_caches', 'uniq_instance_info_caches0instance_uuid'), ('instance_type_projects', 'uniq_instance_type_projects0instance_type_id0project_id0deleted'), ('pci_devices', 'uniq_pci_devices0compute_node_id0address0deleted'), ('virtual_interfaces', 'uniq_virtual_interfaces0address0deleted')]:
        table = oslodbutils.get_table(engine, table_name)
        constraints = [c for c in table.constraints if (c.name == constraint_name)]
        for cons in constraints:
            cons = UniqueConstraint(*[c.name for c in cons.columns], name=cons.name, table=table)
            cons.drop()

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/db/test_migrations.py NovaMigrationsCheckers._pre_upgrade_273/original