You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "Hank Beatty (JIRA)" <ji...@apache.org> on 2017/08/16 14:36:00 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 ]
Hank Beatty updated TC-100:
---------------------------
Fix Version/s: 2.2.0
> 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
> Labels: api_regions
> Fix For: 2.2.0
>
>
> 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.4.14#64029)