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