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

ASF GitHub Bot commented on EAGLE-1051:
---------------------------------------

GitHub user qingwen220 opened a pull request:

    https://github.com/apache/eagle/pull/959

    EAGLE-1051: update removePolicy

    https://issues.apache.org/jira/browse/EAGLE-1051
    
    There is no need to do this check. As eagle has a table 
`policy_publishment` which has defined the relationship between policies and 
publishments. 
    
    {code}
    CREATE TABLE IF NOT EXISTS policy_publishment (
      policyId VARCHAR(50),
      publishmentName VARCHAR(50),
      PRIMARY KEY(policyId, publishmentName),
      CONSTRAINT `policy_id_fk` FOREIGN KEY (`policyId`) REFERENCES 
`policy_definition` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
      CONSTRAINT `publishment_id_fk` FOREIGN KEY (`publishmentName`) REFERENCES 
`publishment` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
    );
    {code}
    


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

    $ git pull https://github.com/qingwen220/eagle EAGLE-1051

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

    https://github.com/apache/eagle/pull/959.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 #959
    
----
commit 118228d83fba85b467c73b30f5f1dc3dac7f2514
Author: Zhao, Qingwen <qingwz...@apache.org>
Date:   2017-06-20T12:58:06Z

    update removePolicy

----


> Check if a publisher can be deleted 
> ------------------------------------
>
>                 Key: EAGLE-1051
>                 URL: https://issues.apache.org/jira/browse/EAGLE-1051
>             Project: Eagle
>          Issue Type: Sub-task
>    Affects Versions: v0.5.0
>            Reporter: Zhao, Qingwen
>            Assignee: Zhao, Qingwen
>
> A publisher can be deleted only when there are no policies using it. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to