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