datatracker/ietf/community
Jim Schaad a18bebe7bd Make sure that the same rule cannot be entered twice in a community list.
As part of this fix, you need to do the following:
1.  Eliminate duplicates currently in the data base.  This statement can be used to identify them.

SELECT e1.id id1, e2.id id2, e1.community_list_id, e1.rule_type, e1.value FROM ietf_utf8.community_rule e1 JOIN ietf_utf8.community_rule e2 ON (e1.id != e2.id AND e1.community_list_id=e2.community_list_id AND e1.rule_type=e2.rule_type AND e1.value=e2.value);

2.  Delete any current duplicate lines in the text.  This uses the following commands as of the check-in

DELETE FROM TABLE ietf_utf8.community_rule WHERE id=19 OR id=91 OR id=177

3.  Add a constraint to the table so that it will enforce the rule itself

ALTER TABLE ietf_utf8.community_rule ADD CONSTRAINT pc_CommunityRule UNIQUE (community_list_id, rule_type, value)
 - Legacy-Id: 5426
2013-02-09 18:09:33 +00:00
..
management Change personal tracking rule update frequency to run every hour. 2012-07-20 11:34:23 +00:00
migrations Added in the community app, which wasn't included properly in the previous commit. 2012-06-27 08:26:18 +00:00
templatetags Added an extra guard against trying to call .is_authenticated on a string. 2012-07-20 11:35:05 +00:00
__init__.py Added in the community app, which wasn't included properly in the previous commit. 2012-06-27 08:26:18 +00:00
constants.py Added in the community app, which wasn't included properly in the previous commit. 2012-06-27 08:26:18 +00:00
display.py Fixed problem with displaying ISE stream documents. 2012-08-02 20:38:43 +00:00
forms.py Added in the community app, which wasn't included properly in the previous commit. 2012-06-27 08:26:18 +00:00
models.py Make sure that the same rule cannot be entered twice in a community list. 2013-02-09 18:09:33 +00:00
rules.py Sort WGs in the community rules drop-down list by acronym rather than WG name. 2012-07-04 14:10:55 +00:00
urls.py Added in the community app, which wasn't included properly in the previous commit. 2012-06-27 08:26:18 +00:00
views.py Make sure that the same rule cannot be entered twice in a community list. 2013-02-09 18:09:33 +00:00