You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "Jeremy Mitchell (JIRA)" <ji...@apache.org> on 2017/01/17 18:28:26 UTC
[jira] [Updated] (TC-100) DELETE api/version/regions/:id should
ensure no phys locs are in the region
[ https://issues.apache.org/jira/browse/TC-100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeremy Mitchell updated TC-100:
-------------------------------
Assignee: (was: Jeremy Mitchell)
> DELETE api/version/regions/:id should ensure no phys locs are in the region
> ---------------------------------------------------------------------------
>
> Key: TC-100
> URL: https://issues.apache.org/jira/browse/TC-100
> Project: Traffic Control
> Issue Type: Bug
> Components: Traffic Ops API
> Reporter: Jeremy Mitchell
> Priority: Minor
>
> Currently, you can attempt to delete a region that is employed by a phys location which results in a database FK constraint error.
> DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st execute failed: ERROR: update or delete on table "region" violates foreign key constraint "fk_phys_location_region" on table "phys_location"
> DETAIL: Key (id)=(1) is still referenced from table "phys_location". [for Statement "DELETE FROM region WHERE ( id = ? )" with ParamValues: 1='1'] at /opt/traffic_ops/app/lib/API/Region.pm line 243
> the api needs to ensure that no phys locs use the region before attempting to delete the region.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)