c6e4e67b465a16ccc17a0bf0653e61ad6dfcdea2
[Packages/TYPO3.CMS.git] / t3lib / stddb / tables.sql
1 #
2
3 #
4 # Table structure for table 'be_groups'
5 #
6 CREATE TABLE be_groups (
7 uid int(11) unsigned NOT NULL auto_increment,
8 pid int(11) unsigned DEFAULT '0' NOT NULL,
9 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
10 title varchar(50) DEFAULT '' NOT NULL,
11 non_exclude_fields text,
12 explicit_allowdeny text,
13 allowed_languages varchar(255) DEFAULT '' NOT NULL,
14 custom_options text,
15 db_mountpoints varchar(255) DEFAULT '' NOT NULL,
16 pagetypes_select varchar(255) DEFAULT '' NOT NULL,
17 tables_select text,
18 tables_modify text,
19 crdate int(11) unsigned DEFAULT '0' NOT NULL,
20 cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
21 groupMods text,
22 file_mountpoints varchar(255) DEFAULT '' NOT NULL,
23 fileoper_perms tinyint(4) DEFAULT '0' NOT NULL,
24 hidden tinyint(1) unsigned DEFAULT '0' NOT NULL,
25 inc_access_lists tinyint(3) unsigned DEFAULT '0' NOT NULL,
26 description text,
27 lockToDomain varchar(50) DEFAULT '' NOT NULL,
28 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
29 TSconfig text,
30 subgroup varchar(255) DEFAULT '' NOT NULL,
31 hide_in_lists tinyint(4) DEFAULT '0' NOT NULL,
32 workspace_perms tinyint(3) DEFAULT '1' NOT NULL,
33 PRIMARY KEY (uid),
34 KEY parent (pid)
35 );
36
37 #
38 # Table structure for table 'be_sessions'
39 #
40 CREATE TABLE be_sessions (
41 ses_id varchar(32) DEFAULT '' NOT NULL,
42 ses_name varchar(32) DEFAULT '' NOT NULL,
43 ses_iplock varchar(39) DEFAULT '' NOT NULL,
44 ses_hashlock int(11) DEFAULT '0' NOT NULL,
45 ses_userid int(11) unsigned DEFAULT '0' NOT NULL,
46 ses_tstamp int(11) unsigned DEFAULT '0' NOT NULL,
47 ses_data longtext,
48 ses_backuserid int(11) NOT NULL default '0',
49 PRIMARY KEY (ses_id,ses_name),
50 KEY ses_tstamp (ses_tstamp)
51 );
52
53 #
54 # Table structure for table 'be_users'
55 #
56 CREATE TABLE be_users (
57 uid int(11) unsigned NOT NULL auto_increment,
58 pid int(11) unsigned DEFAULT '0' NOT NULL,
59 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
60 username varchar(50) DEFAULT '' NOT NULL,
61 password varchar(100) DEFAULT '' NOT NULL,
62 admin tinyint(4) unsigned DEFAULT '0' NOT NULL,
63 usergroup varchar(255) DEFAULT '' NOT NULL,
64 disable tinyint(1) unsigned DEFAULT '0' NOT NULL,
65 starttime int(11) unsigned DEFAULT '0' NOT NULL,
66 endtime int(11) unsigned DEFAULT '0' NOT NULL,
67 lang char(2) DEFAULT '' NOT NULL,
68 email varchar(80) DEFAULT '' NOT NULL,
69 db_mountpoints varchar(255) DEFAULT '' NOT NULL,
70 options tinyint(4) unsigned DEFAULT '0' NOT NULL,
71 crdate int(11) unsigned DEFAULT '0' NOT NULL,
72 cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
73 realName varchar(80) DEFAULT '' NOT NULL,
74 userMods varchar(255) DEFAULT '' NOT NULL,
75 allowed_languages varchar(255) DEFAULT '' NOT NULL,
76 uc mediumtext,
77 file_mountpoints varchar(255) DEFAULT '' NOT NULL,
78 fileoper_perms tinyint(4) DEFAULT '0' NOT NULL,
79 workspace_perms tinyint(3) DEFAULT '1' NOT NULL,
80 lockToDomain varchar(50) DEFAULT '' NOT NULL,
81 disableIPlock tinyint(1) unsigned DEFAULT '0' NOT NULL,
82 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
83 TSconfig text,
84 lastlogin int(10) unsigned DEFAULT '0' NOT NULL,
85 createdByAction int(11) DEFAULT '0' NOT NULL,
86 usergroup_cached_list varchar(255) DEFAULT '' NOT NULL,
87 workspace_id int(11) DEFAULT '0' NOT NULL,
88 workspace_preview tinyint(3) DEFAULT '1' NOT NULL,
89 PRIMARY KEY (uid),
90 KEY parent (pid),
91 KEY username (username)
92 );
93
94 #
95 # Table structure for table 'cache_imagesizes'
96 #
97 CREATE TABLE cache_imagesizes (
98 md5hash varchar(32) DEFAULT '' NOT NULL,
99 md5filename varchar(32) DEFAULT '' NOT NULL,
100 tstamp int(11) DEFAULT '0' NOT NULL,
101 filename varchar(255) DEFAULT '' NOT NULL,
102 imagewidth mediumint(11) unsigned DEFAULT '0' NOT NULL,
103 imageheight mediumint(11) unsigned DEFAULT '0' NOT NULL,
104 PRIMARY KEY (md5filename)
105 ) ENGINE=InnoDB;
106
107 #
108 # Table structure for table 'pages'
109 #
110 CREATE TABLE pages (
111 uid int(11) NOT NULL auto_increment,
112 pid int(11) DEFAULT '0' NOT NULL,
113 t3ver_oid int(11) DEFAULT '0' NOT NULL,
114 t3ver_id int(11) DEFAULT '0' NOT NULL,
115 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
116 t3ver_label varchar(255) DEFAULT '' NOT NULL,
117 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
118 t3ver_stage int(11) DEFAULT '0' NOT NULL,
119 t3ver_count int(11) DEFAULT '0' NOT NULL,
120 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
121 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
122 t3_origuid int(11) DEFAULT '0' NOT NULL,
123 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
124 sorting int(11) unsigned DEFAULT '0' NOT NULL,
125 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
126 perms_userid int(11) unsigned DEFAULT '0' NOT NULL,
127 perms_groupid int(11) unsigned DEFAULT '0' NOT NULL,
128 perms_user tinyint(4) unsigned DEFAULT '0' NOT NULL,
129 perms_group tinyint(4) unsigned DEFAULT '0' NOT NULL,
130 perms_everybody tinyint(4) unsigned DEFAULT '0' NOT NULL,
131 editlock tinyint(4) unsigned DEFAULT '0' NOT NULL,
132 crdate int(11) unsigned DEFAULT '0' NOT NULL,
133 cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
134 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
135 title varchar(255) DEFAULT '' NOT NULL,
136 doktype tinyint(3) unsigned DEFAULT '0' NOT NULL,
137 TSconfig text,
138 storage_pid int(11) DEFAULT '0' NOT NULL,
139 is_siteroot tinyint(4) DEFAULT '0' NOT NULL,
140 php_tree_stop tinyint(4) DEFAULT '0' NOT NULL,
141 tx_impexp_origuid int(11) DEFAULT '0' NOT NULL,
142 url varchar(255) DEFAULT '' NOT NULL,
143 starttime int(11) unsigned DEFAULT '0' NOT NULL,
144 endtime int(11) unsigned DEFAULT '0' NOT NULL,
145 urltype tinyint(4) unsigned DEFAULT '0' NOT NULL,
146 shortcut int(10) unsigned DEFAULT '0' NOT NULL,
147 shortcut_mode int(10) unsigned DEFAULT '0' NOT NULL,
148 no_cache int(10) unsigned DEFAULT '0' NOT NULL,
149 fe_group varchar(100) DEFAULT '0' NOT NULL,
150 subtitle varchar(255) DEFAULT '' NOT NULL,
151 layout tinyint(3) unsigned DEFAULT '0' NOT NULL,
152 url_scheme tinyint(3) unsigned DEFAULT '0' NOT NULL,
153 target varchar(80) DEFAULT '' NOT NULL,
154 media text,
155 lastUpdated int(10) unsigned DEFAULT '0' NOT NULL,
156 keywords text,
157 cache_timeout int(10) unsigned DEFAULT '0' NOT NULL,
158 cache_tags varchar(255) DEFAULT '' NOT NULL,
159 newUntil int(10) unsigned DEFAULT '0' NOT NULL,
160 description text,
161 no_search tinyint(3) unsigned DEFAULT '0' NOT NULL,
162 SYS_LASTCHANGED int(10) unsigned DEFAULT '0' NOT NULL,
163 abstract text,
164 module varchar(10) DEFAULT '' NOT NULL,
165 extendToSubpages tinyint(3) unsigned DEFAULT '0' NOT NULL,
166 author varchar(255) DEFAULT '' NOT NULL,
167 author_email varchar(80) DEFAULT '' NOT NULL,
168 nav_title varchar(255) DEFAULT '' NOT NULL,
169 nav_hide tinyint(4) DEFAULT '0' NOT NULL,
170 content_from_pid int(10) unsigned DEFAULT '0' NOT NULL,
171 mount_pid int(10) unsigned DEFAULT '0' NOT NULL,
172 mount_pid_ol tinyint(4) DEFAULT '0' NOT NULL,
173 alias varchar(32) DEFAULT '' NOT NULL,
174 l18n_cfg tinyint(4) DEFAULT '0' NOT NULL,
175 fe_login_mode tinyint(4) DEFAULT '0' NOT NULL,
176 backend_layout int(10) DEFAULT '0' NOT NULL,
177 backend_layout_next_level int(10) DEFAULT '0' NOT NULL,
178 PRIMARY KEY (uid),
179 KEY t3ver_oid (t3ver_oid,t3ver_wsid),
180 KEY parent (pid,deleted,sorting),
181 KEY alias (alias)
182 );
183
184 #
185 # Table structure for table 'sys_registry'
186 #
187 CREATE TABLE sys_registry (
188 uid int(11) unsigned NOT NULL auto_increment,
189 entry_namespace varchar(128) DEFAULT '' NOT NULL,
190 entry_key varchar(128) DEFAULT '' NOT NULL,
191 entry_value blob,
192 PRIMARY KEY (uid),
193 UNIQUE KEY entry_identifier (entry_namespace,entry_key)
194 );
195
196 #
197 # Table structure for table 'sys_be_shortcuts'
198 #
199 CREATE TABLE sys_be_shortcuts (
200 uid int(11) unsigned NOT NULL auto_increment,
201 userid int(11) unsigned DEFAULT '0' NOT NULL,
202 module_name varchar(255) DEFAULT '' NOT NULL,
203 url text,
204 description varchar(255) DEFAULT '' NOT NULL,
205 sorting int(11) DEFAULT '0' NOT NULL,
206 sc_group tinyint(4) DEFAULT '0' NOT NULL,
207 PRIMARY KEY (uid),
208 KEY event (userid)
209 );
210
211
212 #
213 # Table structure for table 'sys_news'
214 #
215 CREATE TABLE sys_news (
216 uid int(11) unsigned NOT NULL auto_increment,
217 pid int(11) unsigned DEFAULT '0' NOT NULL,
218 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
219 crdate int(11) unsigned DEFAULT '0' NOT NULL,
220 cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
221 deleted tinyint(3) unsigned DEFAULT '0' NOT NULL,
222 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
223 starttime int(11) unsigned DEFAULT '0' NOT NULL,
224 endtime int(11) unsigned DEFAULT '0' NOT NULL,
225 title varchar(255) DEFAULT '' NOT NULL,
226 content mediumtext,
227
228 PRIMARY KEY (uid),
229 KEY parent (pid)
230 );
231
232
233 #
234 # Table structure for table 'sys_filemounts'
235 #
236 CREATE TABLE sys_filemounts (
237 uid int(11) unsigned NOT NULL auto_increment,
238 pid int(11) unsigned DEFAULT '0' NOT NULL,
239 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
240 title varchar(30) DEFAULT '' NOT NULL,
241 path varchar(120) DEFAULT '' NOT NULL,
242 base tinyint(4) unsigned DEFAULT '0' NOT NULL,
243 hidden tinyint(3) unsigned DEFAULT '0' NOT NULL,
244 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
245 sorting int(11) unsigned DEFAULT '0' NOT NULL,
246 PRIMARY KEY (uid),
247 KEY parent (pid)
248 );
249
250
251 #
252 # Table structure for table 'sys_file_storage'
253 #
254 CREATE TABLE sys_file_storage (
255 uid int(11) NOT NULL auto_increment,
256 pid int(11) DEFAULT '0' NOT NULL,
257 tstamp int(11) DEFAULT '0' NOT NULL,
258 crdate int(11) DEFAULT '0' NOT NULL,
259 cruser_id int(11) DEFAULT '0' NOT NULL,
260 deleted tinyint(4) DEFAULT '0' NOT NULL,
261 hidden tinyint(4) DEFAULT '0' NOT NULL,
262
263 name tinytext,
264 description text,
265 driver tinytext,
266 configuration text,
267 is_browsable tinyint(4) DEFAULT '0' NOT NULL,
268 is_public tinyint(4) DEFAULT '0' NOT NULL,
269 is_writable tinyint(4) DEFAULT '0' NOT NULL,
270 is_online tinyint(4) DEFAULT '1' NOT NULL,
271 processingfolder tinytext,
272
273 PRIMARY KEY (uid),
274 KEY parent (pid)
275 );
276
277 #
278 # Table structure for table 'sys_file'
279 #
280 CREATE TABLE sys_file (
281 uid int(11) NOT NULL auto_increment,
282 pid int(11) DEFAULT '0' NOT NULL,
283 tstamp int(11) DEFAULT '0' NOT NULL,
284 crdate int(11) DEFAULT '0' NOT NULL,
285 cruser_id int(11) DEFAULT '0' NOT NULL,
286 t3ver_oid int(11) DEFAULT '0' NOT NULL,
287 t3ver_id int(11) DEFAULT '0' NOT NULL,
288 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
289 t3ver_label varchar(30) DEFAULT '' NOT NULL,
290 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
291 t3ver_stage int(11) DEFAULT '0' NOT NULL,
292 t3ver_count int(11) DEFAULT '0' NOT NULL,
293 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
294 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
295 t3_origuid int(11) DEFAULT '0' NOT NULL,
296 deleted tinyint(4) DEFAULT '0' NOT NULL,
297
298 type varchar(10) DEFAULT '' NOT NULL,
299 storage int(11) DEFAULT '0' NOT NULL,
300 identifier varchar(200) DEFAULT '' NOT NULL,
301 extension varchar(255) DEFAULT '' NOT NULL,
302 mime_type varchar(255) DEFAULT '' NOT NULL,
303 name tinytext,
304 sha1 tinytext,
305 size int(11) DEFAULT '0' NOT NULL,
306 creation_date int(11) DEFAULT '0' NOT NULL,
307 modification_date int(11) DEFAULT '0' NOT NULL,
308 width int(11) DEFAULT '0' NOT NULL,
309 height int(11) DEFAULT '0' NOT NULL,
310 description text,
311 alternative text,
312
313 PRIMARY KEY (uid),
314 KEY parent (pid),
315 KEY t3ver_oid (t3ver_oid,t3ver_wsid)
316 );
317
318 #
319 # Table structure for table 'sys_file_processedfile'.
320 # which is a "temporary" file, like an image preview
321 # This table does not have a TCA representation, as it's only written do using direct SQL queries in the code
322 #
323 CREATE TABLE sys_file_processedfile (
324 uid int(11) NOT NULL auto_increment,
325 pid int(11) DEFAULT '0' NOT NULL,
326 tstamp int(11) DEFAULT '0' NOT NULL,
327 crdate int(11) DEFAULT '0' NOT NULL,
328 cruser_id int(11) DEFAULT '0' NOT NULL,
329 deleted tinyint(4) DEFAULT '0' NOT NULL,
330
331 storage int(11) DEFAULT '0' NOT NULL,
332 original int(11) DEFAULT '0' NOT NULL,
333 identifier varchar(200) DEFAULT '' NOT NULL,
334 name tinytext,
335 configuration text,
336 context varchar(200) DEFAULT '' NOT NULL,
337 checksum varchar(255) DEFAULT '' NOT NULL,
338 is_processed varchar(200) DEFAULT '' NOT NULL,
339 extension varchar(255) DEFAULT '' NOT NULL,
340 mime_type varchar(255) DEFAULT '' NOT NULL,
341 sha1 tinytext,
342 size int(11) DEFAULT '0' NOT NULL,
343 width int(11) DEFAULT '0' NOT NULL,
344 height int(11) DEFAULT '0' NOT NULL,
345
346 PRIMARY KEY (uid),
347 KEY parent (pid)
348 );
349
350 #
351 # Table structure for table 'sys_file_reference'
352 # which is one usage of a file with overloaded metadata
353 #
354 CREATE TABLE sys_file_reference (
355 uid int(11) NOT NULL auto_increment,
356 pid int(11) DEFAULT '0' NOT NULL,
357 tstamp int(11) DEFAULT '0' NOT NULL,
358 crdate int(11) DEFAULT '0' NOT NULL,
359 cruser_id int(11) DEFAULT '0' NOT NULL,
360 sorting int(10) DEFAULT '0' NOT NULL,
361 deleted tinyint(4) DEFAULT '0' NOT NULL,
362 hidden tinyint(4) DEFAULT '0' NOT NULL,
363
364 # Versioning fields
365 t3ver_oid int(11) DEFAULT '0' NOT NULL,
366 t3ver_id int(11) DEFAULT '0' NOT NULL,
367 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
368 t3ver_label varchar(30) DEFAULT '' NOT NULL,
369 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
370 t3ver_stage int(11) DEFAULT '0' NOT NULL,
371 t3ver_count int(11) DEFAULT '0' NOT NULL,
372 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
373 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
374 t3_origuid int(11) DEFAULT '0' NOT NULL,
375
376 # Reference fields (basically same as MM table)
377 uid_local int(11) DEFAULT '0' NOT NULL,
378 uid_foreign int(11) DEFAULT '0' NOT NULL,
379 tablenames varchar(255) DEFAULT '' NOT NULL,
380 fieldname tinytext,
381 sorting_foreign int(11) DEFAULT '0' NOT NULL,
382 table_local varchar(255) DEFAULT '' NOT NULL,
383
384 # Local usage overlay fields
385 title tinytext,
386 description text,
387 alternative tinytext,
388 link tinytext,
389 downloadname tinytext,
390
391 PRIMARY KEY (uid),
392 KEY uid_local (uid_local),
393 KEY uid_foreign (uid_foreign),
394 KEY parent (pid)
395 );
396
397
398 #
399 # Table structure for table 'sys_file_collection'
400 #
401 CREATE TABLE sys_file_collection (
402 uid int(11) NOT NULL auto_increment,
403 pid int(11) DEFAULT '0' NOT NULL,
404 tstamp int(11) DEFAULT '0' NOT NULL,
405 crdate int(11) DEFAULT '0' NOT NULL,
406 cruser_id int(11) DEFAULT '0' NOT NULL,
407 t3ver_oid int(11) DEFAULT '0' NOT NULL,
408 t3ver_id int(11) DEFAULT '0' NOT NULL,
409 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
410 t3ver_label varchar(30) DEFAULT '' NOT NULL,
411 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
412 t3ver_stage int(11) DEFAULT '0' NOT NULL,
413 t3ver_count int(11) DEFAULT '0' NOT NULL,
414 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
415 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
416 t3_origuid int(11) DEFAULT '0' NOT NULL,
417 sys_language_uid int(11) DEFAULT '0' NOT NULL,
418 l10n_parent int(11) DEFAULT '0' NOT NULL,
419 l10n_diffsource mediumtext,
420 deleted tinyint(4) DEFAULT '0' NOT NULL,
421 hidden tinyint(4) DEFAULT '0' NOT NULL,
422 starttime int(11) DEFAULT '0' NOT NULL,
423 endtime int(11) DEFAULT '0' NOT NULL,
424
425 # Actual fields
426 title tinytext,
427 description text,
428 type varchar(6) DEFAULT 'static' NOT NULL,
429
430 # for type=static
431 files int(11) DEFAULT '0' NOT NULL,
432
433 # for type=folder:
434 storage int(11) DEFAULT '0' NOT NULL,
435 folder text NOT NULL,
436
437 PRIMARY KEY (uid),
438 KEY parent (pid),
439 KEY t3ver_oid (t3ver_oid,t3ver_wsid)
440 );
441
442 #
443 # Table structure for table 'sys_collection'
444 #
445 CREATE TABLE sys_collection (
446 uid int(11) NOT NULL auto_increment,
447 pid int(11) DEFAULT '0' NOT NULL,
448 tstamp int(11) DEFAULT '0' NOT NULL,
449 crdate int(11) DEFAULT '0' NOT NULL,
450 cruser_id int(11) DEFAULT '0' NOT NULL,
451 t3ver_oid int(11) DEFAULT '0' NOT NULL,
452 t3ver_id int(11) DEFAULT '0' NOT NULL,
453 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
454 t3ver_label varchar(30) DEFAULT '' NOT NULL,
455 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
456 t3ver_stage int(11) DEFAULT '0' NOT NULL,
457 t3ver_count int(11) DEFAULT '0' NOT NULL,
458 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
459 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
460 t3_origuid int(11) DEFAULT '0' NOT NULL,
461 sys_language_uid int(11) DEFAULT '0' NOT NULL,
462 l10n_parent int(11) DEFAULT '0' NOT NULL,
463 l10n_diffsource mediumtext,
464 deleted tinyint(4) DEFAULT '0' NOT NULL,
465 hidden tinyint(4) DEFAULT '0' NOT NULL,
466 starttime int(11) DEFAULT '0' NOT NULL,
467 endtime int(11) DEFAULT '0' NOT NULL,
468 fe_group int(11) DEFAULT '0' NOT NULL,
469
470 title tinytext,
471 description text,
472 type varchar(32) DEFAULT 'static' NOT NULL,
473 table_name tinytext,
474 items int(11) DEFAULT '0' NOT NULL,
475
476 PRIMARY KEY (uid),
477 KEY parent (pid),
478 KEY t3ver_oid (t3ver_oid,t3ver_wsid)
479 );
480
481 #
482 # Table structure for table 'sys_collection_entries'
483 #
484 CREATE TABLE sys_collection_entries (
485 uid int(11) NOT NULL auto_increment,
486 uid_local int(11) DEFAULT '0' NOT NULL,
487 uid_foreign int(11) DEFAULT '0' NOT NULL,
488 tablenames varchar(30) DEFAULT '' NOT NULL,
489 sorting int(11) DEFAULT '0' NOT NULL,
490
491 KEY uid_local (uid_local),
492 KEY uid_foreign (uid_foreign),
493 PRIMARY KEY (uid)
494 );
495
496 #
497 # Table structure for table 'sys_history'
498 #
499 CREATE TABLE sys_history (
500 uid int(11) unsigned NOT NULL auto_increment,
501 pid int(11) unsigned DEFAULT '0' NOT NULL,
502 sys_log_uid int(11) DEFAULT '0' NOT NULL,
503 history_data mediumtext,
504 fieldlist text,
505 recuid int(11) DEFAULT '0' NOT NULL,
506 tablename varchar(255) DEFAULT '' NOT NULL,
507 tstamp int(11) DEFAULT '0' NOT NULL,
508 history_files mediumtext,
509 snapshot tinyint(4) DEFAULT '0' NOT NULL,
510 PRIMARY KEY (uid),
511 KEY parent (pid),
512 KEY recordident_1 (tablename,recuid),
513 KEY recordident_2 (tablename,tstamp),
514 KEY sys_log_uid (sys_log_uid)
515 ) ENGINE=InnoDB;
516
517 #
518 # Table structure for table 'sys_lockedrecords'
519 #
520 CREATE TABLE sys_lockedrecords (
521 uid int(11) unsigned NOT NULL auto_increment,
522 userid int(11) unsigned DEFAULT '0' NOT NULL,
523 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
524 record_table varchar(255) DEFAULT '' NOT NULL,
525 record_uid int(11) DEFAULT '0' NOT NULL,
526 record_pid int(11) DEFAULT '0' NOT NULL,
527 username varchar(50) DEFAULT '' NOT NULL,
528 feuserid int(11) unsigned DEFAULT '0' NOT NULL,
529 PRIMARY KEY (uid),
530 KEY event (userid,tstamp)
531 );
532
533 #
534 # Table structure for table 'sys_refindex'
535 #
536 CREATE TABLE sys_refindex (
537 hash varchar(32) DEFAULT '' NOT NULL,
538 tablename varchar(255) DEFAULT '' NOT NULL,
539 recuid int(11) DEFAULT '0' NOT NULL,
540 field varchar(40) DEFAULT '' NOT NULL,
541 flexpointer varchar(255) DEFAULT '' NOT NULL,
542 softref_key varchar(30) DEFAULT '' NOT NULL,
543 softref_id varchar(40) DEFAULT '' NOT NULL,
544 sorting int(11) DEFAULT '0' NOT NULL,
545 deleted tinyint(1) DEFAULT '0' NOT NULL,
546 ref_table varchar(255) DEFAULT '' NOT NULL,
547 ref_uid int(11) DEFAULT '0' NOT NULL,
548 ref_string varchar(200) DEFAULT '' NOT NULL,
549
550 PRIMARY KEY (hash),
551 KEY lookup_rec (tablename,recuid),
552 KEY lookup_uid (ref_table,ref_uid),
553 KEY lookup_string (ref_string)
554 );
555
556 #
557 # Table structure for table 'sys_log'
558 #
559 CREATE TABLE sys_log (
560 uid int(11) unsigned NOT NULL auto_increment,
561 pid int(11) unsigned DEFAULT '0' NOT NULL,
562 userid int(11) unsigned DEFAULT '0' NOT NULL,
563 action tinyint(4) unsigned DEFAULT '0' NOT NULL,
564 recuid int(11) unsigned DEFAULT '0' NOT NULL,
565 tablename varchar(255) DEFAULT '' NOT NULL,
566 recpid int(11) DEFAULT '0' NOT NULL,
567 error tinyint(4) unsigned DEFAULT '0' NOT NULL,
568 details text NOT NULL,
569 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
570 type tinyint(3) unsigned DEFAULT '0' NOT NULL,
571 details_nr tinyint(3) unsigned DEFAULT '0' NOT NULL,
572 IP varchar(39) DEFAULT '' NOT NULL,
573 log_data varchar(255) DEFAULT '' NOT NULL,
574 event_pid int(11) DEFAULT '-1' NOT NULL,
575 workspace int(11) DEFAULT '0' NOT NULL,
576 NEWid varchar(20) DEFAULT '' NOT NULL,
577 PRIMARY KEY (uid),
578 KEY parent (pid),
579 KEY event (userid,event_pid),
580 KEY recuidIdx (recuid,uid),
581 KEY user_auth (type,action,tstamp)
582 ) ENGINE=InnoDB;
583
584 #
585 # Table structure for table 'sys_language'
586 #
587 CREATE TABLE sys_language (
588 uid int(11) unsigned NOT NULL auto_increment,
589 pid int(11) unsigned DEFAULT '0' NOT NULL,
590 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
591 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
592 title varchar(80) DEFAULT '' NOT NULL,
593 flag varchar(20) DEFAULT '' NOT NULL,
594 static_lang_isocode int(11) unsigned DEFAULT '0' NOT NULL,
595 PRIMARY KEY (uid),
596 KEY parent (pid)
597 );
598
599 #
600 # Table structure for table 'sys_category'
601 #
602 CREATE TABLE sys_category (
603 uid int(11) NOT NULL auto_increment,
604 pid int(11) DEFAULT '0' NOT NULL,
605 tstamp int(11) DEFAULT '0' NOT NULL,
606 crdate int(11) DEFAULT '0' NOT NULL,
607 cruser_id int(11) DEFAULT '0' NOT NULL,
608 deleted tinyint(4) DEFAULT '0' NOT NULL,
609 hidden tinyint(4) DEFAULT '0' NOT NULL,
610 starttime int(11) unsigned DEFAULT '0' NOT NULL,
611 endtime int(11) unsigned DEFAULT '0' NOT NULL,
612
613 t3ver_oid int(11) DEFAULT '0' NOT NULL,
614 t3ver_id int(11) DEFAULT '0' NOT NULL,
615 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
616 t3ver_label varchar(30) DEFAULT '' NOT NULL,
617 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
618 t3ver_stage int(11) DEFAULT '0' NOT NULL,
619 t3ver_count int(11) DEFAULT '0' NOT NULL,
620 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
621 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
622 t3_origuid int(11) DEFAULT '0' NOT NULL,
623
624 sys_language_uid int(11) DEFAULT '0' NOT NULL,
625 l10n_parent int(11) DEFAULT '0' NOT NULL,
626 l10n_diffsource mediumblob NOT NULL,
627
628 title tinytext NOT NULL,
629 description text NOT NULL,
630 parent int(11) DEFAULT '0' NOT NULL,
631 items int(11) DEFAULT '0' NOT NULL,
632
633 PRIMARY KEY (uid),
634 KEY parent (pid),
635 KEY t3ver_oid (t3ver_oid,t3ver_wsid)
636 );
637
638 #
639 # Table structure for table 'sys_category_record_mm'
640 #
641 CREATE TABLE sys_category_record_mm (
642 uid_local int(11) DEFAULT '0' NOT NULL,
643 uid_foreign int(11) DEFAULT '0' NOT NULL,
644 tablenames varchar(255) DEFAULT '' NOT NULL,
645 sorting int(11) DEFAULT '0' NOT NULL,
646 sorting_foreign int(11) DEFAULT '0' NOT NULL,
647
648 KEY uid_local_foreign (uid_local,uid_foreign)
649 KEY uid_foreign_tablenames (uid_foreign,tablenames)
650 );