1 # column, type, nullability, length, default, database-local
7 'id', 'serial', '', '', '', '',
8 'Name', 'varchar', 'NULL', '16', '', '',
9 'Description', 'varchar', 'NULL', '64', '', '',
10 'Pseudo', 'integer', '', '', '0', '',
12 'primary_key' => 'id',
13 'unique' => [ ['Name'] ],
19 'id', 'serial', '', '', '', '',
20 'PrincipalId', 'integer', 'NULL', '', '', '',
21 'PrincipalType', 'varchar', 'NULL', '25', '', '',
22 'RightName', 'varchar', 'NULL', '25', '', '',
23 'RightScope', 'varchar', 'NULL', '25', '', '',
24 'RightAppliesTo', 'integer', 'NULL', '', '', '',
26 'primary_key' => 'id',
28 'index' => [ ['RightScope', 'PrincipalId'],
29 ['RightScope','RightAppliesTo','RightName','PrincipalType','PrincipalId'] ],
34 'id', 'serial', '', '', '', '',
35 'Type', 'varchar', 'NULL', '16', '', '',
36 'Scope', 'varchar', 'NULL', '16', '', '',
37 'Value', 'integer', 'NULL', '', '', '',
38 'Email', 'varchar', 'NULL', '255', '', '',
39 'Quiet', 'integer', 'NULL', '', '', '',
40 'Owner', 'integer', 'NULL', '', '', '',
41 'Creator', 'integer', 'NULL', '', '', '',
42 'Created', 'timestamp', 'NULL', '', '', '',
43 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
44 'LastUpdated', 'timestamp', 'NULL', '', '', '',
46 'primary_key' => 'id',
48 'index' => [ ['Scope','Value','Type','Owner'] ],
53 'id', 'serial', '', '', '', '',
54 'Base', 'varchar', 'NULL', '240', '', '',
55 'Target', 'varchar', 'NULL', '240', '', '',
56 'Type', 'varchar', '', '20', '', '',
57 'LocalTarget', 'integer', 'NULL', '', '', '',
58 'LocalBase', 'integer', 'NULL', '', '', '',
59 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
60 'LastUpdated', 'timestamp', 'NULL', '', '', '',
61 'Creator', 'integer', 'NULL', '', '', '',
62 'Created', 'timestamp', 'NULL', '', '', '',
64 'primary_key' => 'id',
65 'unique' => [ ['Base', 'Target', 'Type'] ],
71 'id', 'serial', '', '', '', '',
72 'Name', 'varchar', '', '120', '', '',
73 'Password', 'varchar', 'NULL', '40', '', '',
74 'Comments', 'blob', 'NULL', '', '', '',
75 'Signature', 'blob', 'NULL', '', '', '',
76 'EmailAddress', 'varchar', 'NULL', '120', '', '',
77 'FreeformContactInfo', 'blob', 'NULL', '', '', '',
78 'Organization', 'varchar', 'NULL', '200', '', '',
79 'Privileged', 'integer', 'NULL', '', '', '',
80 'RealName', 'varchar', 'NULL', '120', '', '',
81 'Nickname', 'varchar', 'NULL', '16', '', '',
82 'Lang', 'varchar', 'NULL', '16', '', '',
83 'EmailEncoding', 'varchar', 'NULL', '16', '', '',
84 'WebEncoding', 'varchar', 'NULL', '16', '', '',
85 'ExternalContactInfoId', 'varchar', 'NULL', '100', '', '',
86 'ContactInfoSystem', 'varchar', 'NULL', '30', '', '',
87 'ExternalAuthId', 'varchar', 'NULL', '100', '', '',
88 'AuthSystem', 'varchar', 'NULL', '30', '', '',
89 'Gecos', 'varchar', 'NULL', '16', '', '',
90 'HomePhone', 'varchar', 'NULL', '30', '', '',
91 'WorkPhone', 'varchar', 'NULL', '30', '', '',
92 'MobilePhone', 'varchar', 'NULL', '30', '', '',
93 'PagerPhone', 'varchar', 'NULL', '30', '', '',
94 'Address1', 'varchar', 'NULL', '200', '', '',
95 'Address2', 'varchar', 'NULL', '200', '', '',
96 'City', 'varchar', 'NULL', '100', '', '',
97 'State', 'varchar', 'NULL', '100', '', '',
98 'Zip', 'varchar', 'NULL', '16', '', '',
99 'Country', 'varchar', 'NULL', '50', '', '',
100 'Creator', 'integer', 'NULL', '', '', '',
101 'Created', 'timestamp', 'NULL', '', '', '',
102 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
103 'LastUpdated', 'timestamp', 'NULL', '', '', '',
104 'Disabled', 'int2', '','','0','',
106 'primary_key' => 'id',
107 'unique' => [ ['Name'] ],
108 'index' => [ ['Name'],
109 ['id', 'EmailAddress'],
115 'id', 'serial', '', '', '', '',
116 'EffectiveId', 'integer', 'NULL', '', '', '',
117 'Queue', 'integer', 'NULL', '', '', '',
118 'Type', 'varchar', 'NULL', '16', '', '',
119 'IssueStatement', 'integer', 'NULL', '', '', '',
120 'Resolution', 'integer', 'NULL', '', '', '',
121 'Owner', 'integer', 'NULL', '', '', '',
122 'Subject', 'varchar', 'NULL', '200', '[no subject]', '',
123 'InitialPriority', 'integer', 'NULL', '', '', '',
124 'FinalPriority', 'integer', 'NULL', '', '', '',
125 'Priority', 'integer', 'NULL', '', '', '',
126 'Status', 'varchar', 'NULL', '10', '', '',
127 'TimeWorked', 'integer', 'NULL', '', '', '',
128 'TimeLeft', 'integer', 'NULL', '', '', '',
129 'Told', 'timestamp', 'NULL', '', '', '',
130 'Starts', 'timestamp', 'NULL', '', '', '',
131 'Started', 'timestamp', 'NULL', '', '', '',
132 'Due', 'timestamp', 'NULL', '', '', '',
133 'Resolved', 'timestamp', 'NULL', '', '', '',
134 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
135 'LastUpdated', 'timestamp', 'NULL', '', '', '',
136 'Creator', 'integer', 'NULL', '', '', '',
137 'Created', 'timestamp', 'NULL', '', '', '',
138 'Disabled', 'int2', '','','0','',
140 'primary_key' => 'id',
142 'index' => [ ['Queue', 'Status'],
146 ['id', 'EffectiveId'] ],
151 'id', 'serial', '', '', '', '',
152 'GroupId', 'integer', 'NULL', '', '', '', #foreign key, Groups::id
153 'UserId', 'integer', 'NULL', '', '', '', #foreign key, Users::id
155 'primary_key' => 'id',
156 'unique' => [ ['GroupId', 'UserId'] ],
162 'id', 'serial', '', '', '', '',
163 'Name', 'varchar', '', '120', '', '', #Textual 'name' for this queue
164 'Description', 'varchar', 'NULL', '120', '', '', #Textual descr. of this
166 'CorrespondAddress', 'varchar', 'NULL', '120', '', '',
167 'CommentAddress', 'varchar', 'NULL', '120', '', '',
168 'InitialPriority', 'integer', 'NULL', '', '', '',
169 'FinalPriority', 'integer', 'NULL', '', '', '',
170 'DefaultDueIn', 'integer', 'NULL', '', '', '',
172 'Creator', 'integer', 'NULL', '', '', '',
173 'Created', 'timestamp', 'NULL', '', '', '',
174 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
175 'LastUpdated', 'timestamp', 'NULL', '', '', '',
176 'Disabled', 'int2', '','','0','',
178 'primary_key' => 'id',
179 'unique' => [ ['Name'] ],
185 'id', 'serial', '', '', '', '',
186 'EffectiveTicket', 'integer', 'NULL', '', '', '',
187 'Ticket', 'integer', 'NULL', '', '', '', #Foreign key Ticket::id
188 'TimeTaken', 'integer', 'NULL', '', '', '', #Time spent on this trans in min
189 'Type', 'varchar', 'NULL', '20', '', '',
190 'Field', 'varchar', 'NULL', '40', '', '', #If it's a "Set" transaction, what
192 'OldValue', 'varchar', 'NULL', '255', '', '',
193 'NewValue', 'varchar', 'NULL', '255', '', '',
194 'Data', 'varchar', 'NULL', '100', '', '',
197 'Creator', 'integer', 'NULL', '', '', '',
198 'Created', 'timestamp', 'NULL', '', '', '',
201 'primary_key' => 'id',
203 'index' => [ ['Ticket'], ['EffectiveTicket'] ],
208 'id', 'serial', '', '', '', '',
209 'Name', 'varchar', 'NULL', '255', '', '', # Alias
210 'Description', 'varchar', 'NULL', '255', '', '', #Textual description
211 'ExecModule', 'varchar', 'NULL', '60', '', '', #This calles RT::Action::___
212 'Argument', 'varchar', 'NULL', '255', '', '', #We can pass a single argument
213 #to the scrip. sometimes, it's who to send mail to.
214 'Creator', 'integer', 'NULL', '', '', '',
215 'Created', 'timestamp', 'NULL', '', '', '',
216 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
217 'LastUpdated', 'timestamp', 'NULL', '', '', '',
219 'primary_key' => 'id',
224 'ScripConditions' => {
226 'id', 'serial', '', '', '', '',
227 'Name', 'varchar', 'NULL', '255', '', '', # Alias
228 'Description', 'varchar', 'NULL', '255', '', '', #Textual description
229 'ExecModule', 'varchar', 'NULL', '60', '', '', #This calles RT::Condition::
230 'Argument', 'varchar', 'NULL', '255', '', '', #We can pass a single argument
231 #to the scrip. sometimes, it's who to send mail to.
232 'ApplicableTransTypes', 'varchar', 'NULL', '60', '', '',#Transaction types this scrip
233 # acts on. comma or / delimited is just great.
234 'Creator', 'integer', 'NULL', '', '', '',
235 'Created', 'timestamp', 'NULL', '', '', '',
236 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
237 'LastUpdated', 'timestamp', 'NULL', '', '', '',
239 'primary_key' => 'id',
245 'id', 'serial', '', '', '', '',
246 'ScripCondition', 'integer', 'NULL', '', '', '', #Foreign key ScripConditions::id
247 'ScripAction', 'integer', 'NULL', '', '', '', #Foreign key ScripActions::id
248 'Stage', 'varchar', 'NULL', '32','','', #What stage does this scrip
249 #Happen in. for now, everything is 'TransactionCreate',
250 'Queue', 'integer', 'NULL', '', '', '', #Foreign key Queues::id
251 'Template', 'integer', 'NULL', '', '', '', #Foreign key Templates::id
253 'Creator', 'integer', 'NULL', '', '', '',
254 'Created', 'timestamp', 'NULL', '', '', '',
255 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
256 'LastUpdated', 'timestamp', 'NULL', '', '', '',
258 'primary_key' => 'id',
265 'id', 'serial', '', '', '', '',
266 'TransactionId', 'integer', '', '', '', '', #Foreign key Transactions::Id
267 'Parent', 'integer', 'NULL', '', '', '', # Attachments::Id
268 'MessageId', 'varchar', 'NULL', '160', '', '', #RFC822 messageid, if any
269 'Subject', 'varchar', 'NULL', '255', '', '',
270 'Filename', 'varchar', 'NULL', '255', '', '',
271 'ContentType', 'varchar', 'NULL', '80', '', '',
272 'ContentEncoding', 'varchar', 'NULL', '80', '', '',
273 'Content', 'long varbinary', 'NULL', '', '', '',
274 'Headers', 'long varbinary', 'NULL', '', '', '',
276 'Creator', 'integer', 'NULL', '', '', '',
277 'Created', 'timestamp', 'NULL', '', '', '',
280 'primary_key' => 'id',
282 'index' => [ ['Parent'], ['TransactionId'], ['Parent', 'TransactionId'] ],
287 'id', 'serial', '', '', '', '',
288 'Queue', 'integer', 'NOT NULL', '', '0', '',
289 'Name', 'varchar', '', '40', '', '',
290 'Description', 'varchar', 'NULL', '120', '', '',
291 'Type', 'varchar', 'NULL', '16', '','',
292 'Language', 'varchar', 'NULL', '16', '', '',
293 'TranslationOf', 'integer', 'NULL', '', '', '',
294 'Content', 'blob', 'NULL', '', '', '',
295 'LastUpdated', 'timestamp', 'NULL', '', '', '',
296 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
297 'Creator', 'integer', 'NULL', '', '', '',
298 'Created', 'timestamp', 'NULL', '', '', '',
300 'primary_key' => 'id',
301 'unique' => [ [''] ],
307 'id', 'serial', '', '', '', '',
308 'Name', 'varchar', 'NOT NULL', '255', '', '',
309 'Description', 'varchar', 'NULL', '255', '', '',
310 'Parent', 'integer', 'NULL', '', '', '',
311 'Disabled', 'int2', '','','0','',
313 'primary_key' => 'id',
314 'unique' => [ [ 'Name', 'Parent' ] ],
315 'index' => [ [ 'Name', ], [ 'Parent' ] ],
318 'ObjectKeywords' => {
320 'id', 'serial', '', '', '', '',
321 'Keyword', 'integer', 'NOT NULL', '', '', '',
322 'KeywordSelect', 'integer', 'NOT NULL', '', '', '',
323 'ObjectType', 'varchar', 'NOT NULL', '32', '', '',
324 'ObjectId', 'integer', 'NOT NULL', '', '', '',
326 'primary_key' => 'id',
327 'unique' => [ [ 'ObjectId', 'ObjectType','KeywordSelect', 'Keyword' ] ],
328 'index' => [ [ 'ObjectId', 'ObjectType' ] , ['Keyword'] ],
332 'KeywordSelects' => {
334 'id', 'serial', '', '', '', '',
335 'Name','varchar','NULL','255','','',
336 'Keyword', 'integer', 'NULL', '', '', '',
337 'Single', 'integer', 'NULL', '', '', '',
338 'Depth', 'integer', 'NOT NULL', '', 0, '',
339 'ObjectType', 'varchar', 'NOT NULL', '32', '', '',
340 'ObjectField', 'varchar', 'NULL', '32', '', '',
341 'ObjectValue', 'varchar', 'NULL', '255', '', '',
342 'Disabled', 'int2', '','','0','',
344 'primary_key' => 'id',
346 'index' => [ [ 'Keyword' ], [ 'ObjectType', 'ObjectField', 'ObjectValue'] ],