You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/04/05 00:35:41 UTC

[jira] [Commented] (TC-222) TO - add unique constraints to parameter, job_status, job_agent, role, status, and type tables

    [ https://issues.apache.org/jira/browse/TC-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15956121#comment-15956121 ] 

ASF GitHub Bot commented on TC-222:
-----------------------------------

GitHub user mitchell852 opened a pull request:

    https://github.com/apache/incubator-trafficcontrol/pull/427

    [TC-222] - adds unique constraint to a number of tables

    to:
    
    parameter (name, config_file, value)
    job_status (name)
    job_agent (name)
    role (name)
    status (name)
    type (name)
    
    also, instructs seeds.sql to skip if a constraint conflict exists, thus preventing duplicates.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mitchell852/incubator-trafficcontrol seeds

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafficcontrol/pull/427.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #427
    
----
commit 382a7d4e183edd89976a95c54d89ec341a14c14a
Author: Jeremy Mitchell <mi...@gmail.com>
Date:   2017-04-04T20:21:00Z

    adds unique constraints to job_status, role, status, type, job_agent and parameter table

commit eb06eb4304c8bb2aaf0af456d6cf5533df5e26a2
Author: Jeremy Mitchell <mi...@gmail.com>
Date:   2017-04-04T20:22:02Z

    inserts are ignored if unique constraints are violated resulting in no errors / dups

----


> TO - add unique constraints to parameter, job_status, job_agent, role, status, and type tables
> ----------------------------------------------------------------------------------------------
>
>                 Key: TC-222
>                 URL: https://issues.apache.org/jira/browse/TC-222
>             Project: Traffic Control
>          Issue Type: Improvement
>          Components: Traffic Ops
>            Reporter: Jeremy Mitchell
>            Assignee: Jeremy Mitchell
>            Priority: Minor
>
> The following unique constraints would prevent duplicate entries in the database:
> - parameter (name, config_file, value)
> - job_status (name)
> - job_agent (name)
> - role (name)
> - status (name)
> - type (name)
> Once these constraints are in place, seeds.sql can be enhanced to avoid duplicate entries.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)