~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to userdb/users.sql

  • Committer: wagrant
  • Date: 2008-09-03 00:38:55 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1044
userdb: Properly verify that the group name is unique only within the
        offering. This requires a change in one of the triggers, so
        needs a migration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
        oid INTEGER;
98
98
    BEGIN
99
99
        SELECT offeringid INTO oid FROM project_set WHERE project_set.projectsetid = NEW.projectsetid;
100
 
        PERFORM 1 FROM project_group, project_set WHERE project_group.projectsetid = project_set.projectsetid AND project_group.groupnm = NEW.groupnm;
 
100
        PERFORM 1 FROM project_group, project_set WHERE project_set.offeringid = oid AND project_group.projectsetid = project_set.projectsetid AND project_group.groupnm = NEW.groupnm;
101
101
        IF found THEN
102
102
            RAISE EXCEPTION ''a project group named % already exists in offering ID %'', NEW.groupnm, oid;
103
103
        END IF;