diff options
Diffstat (limited to 'rt/etc/constraints.mysql')
-rw-r--r-- | rt/etc/constraints.mysql | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/rt/etc/constraints.mysql b/rt/etc/constraints.mysql index 33a037673..fd557d5e4 100644 --- a/rt/etc/constraints.mysql +++ b/rt/etc/constraints.mysql @@ -1,8 +1,5 @@ -#ALTER TABLE Users ADD FOREIGN KEY (Creator) REFERENCES Users(id); -#ALTER TABLE Users ADD FOREIGN KEY (LastUpdatedBy) REFERENCES Users(id); ALTER TABLE Links ADD FOREIGN KEY (LocalBase) REFERENCES Tickets(id) ; ALTER TABLE Links ADD FOREIGN KEY (LocalTarget) REFERENCES Tickets(id); - ObjectId integer, # FOREIGN KEY to Users or Groups, depending ALTER TABLE Tickets ADD FOREIGN KEY (Queue) REFERENCES Queues(id); ALTER TABLE Tickets ADD FOREIGN KEY (EffectiveId) REFERENCES Tickets(id); ALTER TABLE Tickets ADD FOREIGN KEY (Owner) REFERENCES Principals(id); @@ -19,18 +16,11 @@ ALTER TABLE Scrips ADD FOREIGN KEY (Queue) REFERENCES Queues(id); ALTER TABLE Scrips ADD FOREIGN KEY (Creator) REFERENCES Users(id); ALTER TABLE Scrips ADD FOREIGN KEY (LastUpdatedBy) REFERENCES Users(id); - PrincipalId integer NOT NULL , #ALTER TABLE ADD FOREIGN KEY to principals - DelegatedBy integer NOT NULL default 0, #ALTER TABLE ADD FOREIGN KEY to principals with a userid - DelegatedFrom integer NOT NULL default 0, #ALTER TABLE ADD FOREIGN KEY to ACL ALTER TABLE ACL ADD FOREIGN KEY (PrincipalId) REFERENCES Principals(id); ALTER TABLE ACL ADD FOREIGN KEY (DelegatedBy) REFERENCES Principals(id); ALTER TABLE ACL ADD FOREIGN KEY (DelegatedFrom) REFERENCES ACL(id); - ALTER TABLE GroupMembers ADD FOREIGN KEY (GroupId) REFERENCES Principals(id); + ALTER TABLE GroupMembers ADD FOREIGN KEY (GroupId) REFERENCES Groups(id); ALTER TABLE GroupMembers ADD FOREIGN KEY (MemberId) REFERENCES Principals(id); - GroupId int, # ALTER TABLE ADD FOREIGN KEY to Principals - MemberId int, # ALTER TABLE ADD FOREIGN KEY to Principals - Via int, #ALTER TABLE ADD FOREIGN KEY to CachedGroupMembers. (may point to $self->id) - ImmediateParentId int, #ALTER TABLE ADD FOREIGN KEY to prinicpals. ALTER TABLE CachedGroupMembers ADD FOREIGN KEY (ImmediateParentId) REFERENCES Principals(id); ALTER TABLE CachedGroupMembers ADD FOREIGN KEY (GroupId) REFERENCES Principals(id); ALTER TABLE CachedGroupMembers ADD FOREIGN KEY (MemberId) REFERENCES Principals(id); @@ -43,7 +33,7 @@ ALTER TABLE CustomFields ADD FOREIGN KEY (Queue) REFERENCES Queues(id); ALTER TABLE CustomFields ADD FOREIGN KEY (Creator) REFERENCES Users(id); ALTER TABLE CustomFields ADD FOREIGN KEY (LastUpdatedBy) REFERENCES Users(id); - ALTER TABLE TicketCustomFieldValues ADD FOREIGN KEY (Ticket) REFERENCES Ticketss(id); + ALTER TABLE TicketCustomFieldValues ADD FOREIGN KEY (Ticket) REFERENCES Tickets(id); ALTER TABLE TicketCustomFieldValues ADD FOREIGN KEY (CustomField) REFERENCES CustomFields(id); ALTER TABLE TicketCustomFieldValues ADD FOREIGN KEY (Creator) REFERENCES Users(id); ALTER TABLE TicketCustomFieldValues ADD FOREIGN KEY (LastUpdatedBy) REFERENCES Users(id); |