blob: 355d2c5e545267935fdd0e279eef9bb6b2993752 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
ALTER TABLE Links ADD INDEX(LocalBase);
ALTER TABLE Links ADD FOREIGN KEY (LocalBase) REFERENCES Tickets(id);
ALTER TABLE Links ADD INDEX(LocalTarget);
ALTER TABLE Links ADD FOREIGN KEY (LocalTarget) REFERENCES Tickets(id);
ALTER TABLE Tickets ADD INDEX(Queue);
ALTER TABLE Tickets ADD FOREIGN KEY (Queue) REFERENCES Queues(id);
ALTER TABLE Tickets ADD INDEX(EffectiveId);
ALTER TABLE Tickets ADD FOREIGN KEY (EffectiveId) REFERENCES Tickets(id);
ALTER TABLE Tickets ADD INDEX(Owner);
ALTER TABLE Tickets ADD FOREIGN KEY (Owner) REFERENCES Principals(id);
ALTER TABLE Tickets ADD INDEX(Creator);
ALTER TABLE Tickets ADD INDEX(LastUpdatedBy);
ALTER TABLE Tickets ADD FOREIGN KEY (Creator) REFERENCES Users(id);
ALTER TABLE Tickets ADD FOREIGN KEY (LastUpdatedBy) REFERENCES Users(id);
ALTER TABLE Transactions ADD INDEX(Creator);
ALTER TABLE Transactions ADD INDEX (Ticket) ;
ALTER TABLE Transactions ADD INDEX (EffectiveTicket) ;
ALTER TABLE Transactions ADD FOREIGN KEY (Creator) REFERENCES Users(id);
ALTER TABLE Transactions ADD FOREIGN KEY (Ticket) REFERENCES Tickets(id);
ALTER TABLE Transactions ADD FOREIGN KEY (EffectiveTicket) REFERENCES Tickets(id);
ALTER TABLE Attachments ADD INDEX (TransactionId) ;
ALTER TABLE Attachments ADD INDEX (Parent) ;
ALTER TABLE Attachments ADD FOREIGN KEY (TransactionId) REFERENCES Transactions(id);
ALTER TABLE Attachments ADD FOREIGN KEY (Parent) REFERENCES Attachments(id);
ALTER TABLE Scrips ADD INDEX (ScripCondition) ;
ALTER TABLE Scrips ADD INDEX (ScripAction) ;
ALTER TABLE Scrips ADD INDEX (Template) ;
ALTER TABLE Scrips ADD INDEX (Queue) ;
ALTER TABLE Scrips ADD INDEX (Creator) ;
ALTER TABLE Scrips ADD INDEX (LastUpdatedBy) ;
ALTER TABLE Scrips ADD FOREIGN KEY (ScripCondition) REFERENCES ScripConditions(id);
ALTER TABLE Scrips ADD FOREIGN KEY (ScripAction) REFERENCES ScripActions(id);
ALTER TABLE Scrips ADD FOREIGN KEY (Template) REFERENCES Templates(id);
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);
ALTER TABLE ACL ADD INDEX (PrincipalId) ;
ALTER TABLE ACL ADD INDEX (DelegatedBy) ;
ALTER TABLE ACL ADD INDEX (DelegatedFrom) ;
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 INDEX (MemberId);
ALTER TABLE GroupMembers ADD INDEX (GroupId);
ALTER TABLE GroupMembers ADD FOREIGN KEY (GroupId) REFERENCES Groups(id);
ALTER TABLE GroupMembers ADD FOREIGN KEY (MemberId) REFERENCES Principals(id);
ALTER TABLE CachedGroupMembers ADD INDEX (ImmediateParentId) ;
ALTER TABLE CachedGroupMembers ADD INDEX (GroupId) ;
ALTER TABLE CachedGroupMembers ADD INDEX (MemberId) ;
ALTER TABLE CachedGroupMembers ADD INDEX (Via) ;
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);
ALTER TABLE CachedGroupMembers ADD FOREIGN KEY (Via) REFERENCES CachedGroupMembers(id);
ALTER TABLE ScripActions ADD INDEX(Creator);
ALTER TABLE ScripActions ADD INDEX(LastUpdatedBy);
ALTER TABLE ScripActions ADD FOREIGN KEY (Creator) REFERENCES Users(id);
ALTER TABLE ScripActions ADD FOREIGN KEY (LastUpdatedBy) REFERENCES Users(id);
ALTER TABLE Templates ADD INDEX(Queue);
ALTER TABLE Templates ADD INDEX(Creator);
ALTER TABLE Templates ADD INDEX(LastUpdatedBy);
ALTER TABLE Templates ADD FOREIGN KEY (Queue) REFERENCES Queues(id);
ALTER TABLE Templates ADD FOREIGN KEY (Creator) REFERENCES Users(id);
ALTER TABLE Templates ADD FOREIGN KEY (LastUpdatedBy) REFERENCES Users(id);
ALTER TABLE CustomFields ADD INDEX(Queue);
ALTER TABLE CustomFields ADD INDEX(Creator);
ALTER TABLE CustomFields ADD INDEX(LastUpdatedBy);
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 INDEX(Ticket);
ALTER TABLE TicketCustomFieldValues ADD INDEX(CustomField);
ALTER TABLE TicketCustomFieldValues ADD INDEX(Creator);
ALTER TABLE TicketCustomFieldValues ADD INDEX(LastUpdatedBy);
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);
ALTER TABLE CustomFieldValues ADD INDEX(CustomField);
ALTER TABLE CustomFieldValues ADD INDEX(Creator);
ALTER TABLE CustomFieldValues ADD INDEX(LastUpdatedBy);
ALTER TABLE CustomFieldValues ADD FOREIGN KEY (CustomField) REFERENCES CustomFields(id);
ALTER TABLE CustomFieldValues ADD FOREIGN KEY (Creator) REFERENCES Users(id);
ALTER TABLE CustomFieldValues ADD FOREIGN KEY (LastUpdatedBy) REFERENCES Users(id);
|