[CLEANUP] Simplify updating of timestamp in writeForeignField
[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_name varchar(32) DEFAULT '' NOT NULL,
41 ses_iplock varchar(39) DEFAULT '' NOT NULL,
42 ses_userid int(11) unsigned DEFAULT '0' NOT NULL,
43 ses_tstamp int(11) unsigned DEFAULT '0' NOT NULL,
44 ses_data longblob,
45 ses_backuserid int(11) NOT NULL default '0',
46 PRIMARY KEY (ses_id,ses_name),
47 KEY ses_tstamp (ses_tstamp)
48 );
49
50 #
51 # Table structure for table 'be_users'
52 #
53 CREATE TABLE be_users (
54 uid int(11) unsigned NOT NULL auto_increment,
55 pid int(11) unsigned DEFAULT '0' NOT NULL,
56 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
57 username varchar(50) DEFAULT '' NOT NULL,
58 description varchar(2000) DEFAULT '' NOT NULL,
59 avatar int(11) unsigned NOT NULL default '0',
60 password varchar(100) DEFAULT '' NOT NULL,
61 admin tinyint(4) unsigned DEFAULT '0' NOT NULL,
62 usergroup varchar(255) DEFAULT '' NOT NULL,
63 disable tinyint(1) unsigned DEFAULT '0' NOT NULL,
64 starttime int(11) unsigned DEFAULT '0' NOT NULL,
65 endtime int(11) unsigned DEFAULT '0' NOT NULL,
66 lang varchar(6) DEFAULT '' NOT NULL,
67 email varchar(80) DEFAULT '' NOT NULL,
68 db_mountpoints text,
69 options tinyint(4) unsigned DEFAULT '0' NOT NULL,
70 crdate int(11) unsigned DEFAULT '0' NOT NULL,
71 cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
72 realName varchar(80) DEFAULT '' NOT NULL,
73 userMods text,
74 allowed_languages varchar(255) DEFAULT '' NOT NULL,
75 uc mediumblob,
76 file_mountpoints text,
77 file_permissions text,
78 workspace_perms tinyint(3) DEFAULT '1' NOT NULL,
79 lockToDomain varchar(50) DEFAULT '' NOT NULL,
80 disableIPlock tinyint(1) unsigned DEFAULT '0' NOT NULL,
81 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
82 TSconfig text,
83 lastlogin int(10) unsigned DEFAULT '0' NOT NULL,
84 createdByAction int(11) DEFAULT '0' NOT NULL,
85 usergroup_cached_list text,
86 workspace_id int(11) DEFAULT '0' NOT NULL,
87 workspace_preview tinyint(3) DEFAULT '1' NOT NULL,
88 category_perms text,
89 PRIMARY KEY (uid),
90 KEY parent (pid),
91 KEY username (username)
92 );
93
94 #
95 # Table structure for table 'pages'
96 #
97 CREATE TABLE pages (
98 uid int(11) NOT NULL auto_increment,
99 pid int(11) DEFAULT '0' NOT NULL,
100 t3ver_oid int(11) DEFAULT '0' NOT NULL,
101 t3ver_id int(11) DEFAULT '0' NOT NULL,
102 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
103 t3ver_label varchar(255) DEFAULT '' NOT NULL,
104 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
105 t3ver_stage int(11) DEFAULT '0' NOT NULL,
106 t3ver_count int(11) DEFAULT '0' NOT NULL,
107 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
108 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
109 t3_origuid int(11) DEFAULT '0' NOT NULL,
110 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
111 sorting int(11) unsigned DEFAULT '0' NOT NULL,
112 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
113 perms_userid int(11) unsigned DEFAULT '0' NOT NULL,
114 perms_groupid int(11) unsigned DEFAULT '0' NOT NULL,
115 perms_user tinyint(4) unsigned DEFAULT '0' NOT NULL,
116 perms_group tinyint(4) unsigned DEFAULT '0' NOT NULL,
117 perms_everybody tinyint(4) unsigned DEFAULT '0' NOT NULL,
118 editlock tinyint(4) unsigned DEFAULT '0' NOT NULL,
119 crdate int(11) unsigned DEFAULT '0' NOT NULL,
120 cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
121 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
122 title varchar(255) DEFAULT '' NOT NULL,
123 doktype int(11) unsigned DEFAULT '0' NOT NULL,
124 TSconfig text,
125 is_siteroot tinyint(4) DEFAULT '0' NOT NULL,
126 php_tree_stop tinyint(4) DEFAULT '0' NOT NULL,
127 url varchar(255) DEFAULT '' NOT NULL,
128 starttime int(11) unsigned DEFAULT '0' NOT NULL,
129 endtime int(11) unsigned DEFAULT '0' NOT NULL,
130 urltype tinyint(4) unsigned DEFAULT '0' NOT NULL,
131 shortcut int(10) unsigned DEFAULT '0' NOT NULL,
132 shortcut_mode int(10) unsigned DEFAULT '0' NOT NULL,
133 no_cache int(10) unsigned DEFAULT '0' NOT NULL,
134 fe_group varchar(100) DEFAULT '0' NOT NULL,
135 subtitle varchar(255) DEFAULT '' NOT NULL,
136 layout int(11) unsigned DEFAULT '0' NOT NULL,
137 target varchar(80) DEFAULT '' NOT NULL,
138 media int(11) unsigned DEFAULT '0' NOT NULL,
139 lastUpdated int(10) unsigned DEFAULT '0' NOT NULL,
140 keywords text,
141 cache_timeout int(10) unsigned DEFAULT '0' NOT NULL,
142 cache_tags varchar(255) DEFAULT '' NOT NULL,
143 newUntil int(10) unsigned DEFAULT '0' NOT NULL,
144 description text,
145 no_search tinyint(3) unsigned DEFAULT '0' NOT NULL,
146 SYS_LASTCHANGED int(10) unsigned DEFAULT '0' NOT NULL,
147 abstract text,
148 module varchar(255) DEFAULT '' NOT NULL,
149 extendToSubpages tinyint(3) unsigned DEFAULT '0' NOT NULL,
150 author varchar(255) DEFAULT '' NOT NULL,
151 author_email varchar(80) DEFAULT '' NOT NULL,
152 nav_title varchar(255) DEFAULT '' NOT NULL,
153 nav_hide tinyint(4) DEFAULT '0' NOT NULL,
154 content_from_pid int(10) unsigned DEFAULT '0' NOT NULL,
155 mount_pid int(10) unsigned DEFAULT '0' NOT NULL,
156 mount_pid_ol tinyint(4) DEFAULT '0' NOT NULL,
157 alias varchar(32) DEFAULT '' NOT NULL,
158 l18n_cfg tinyint(4) DEFAULT '0' NOT NULL,
159 fe_login_mode tinyint(4) DEFAULT '0' NOT NULL,
160 backend_layout varchar(64) DEFAULT '' NOT NULL,
161 backend_layout_next_level varchar(64) DEFAULT '' NOT NULL,
162 tsconfig_includes text,
163 PRIMARY KEY (uid),
164 KEY t3ver_oid (t3ver_oid,t3ver_wsid),
165 KEY parent (pid,deleted,sorting),
166 KEY alias (alias),
167 KEY determineSiteRoot (is_siteroot)
168 );
169
170 #
171 # Table structure for table 'sys_registry'
172 #
173 CREATE TABLE sys_registry (
174 uid int(11) unsigned NOT NULL auto_increment,
175 entry_namespace varchar(128) DEFAULT '' NOT NULL,
176 entry_key varchar(128) DEFAULT '' NOT NULL,
177 entry_value blob,
178 PRIMARY KEY (uid),
179 UNIQUE KEY entry_identifier (entry_namespace,entry_key)
180 );
181
182 #
183 # Table structure for table 'sys_be_shortcuts'
184 #
185 CREATE TABLE sys_be_shortcuts (
186 uid int(11) unsigned NOT NULL auto_increment,
187 userid int(11) unsigned DEFAULT '0' NOT NULL,
188 module_name varchar(255) DEFAULT '' NOT NULL,
189 url text,
190 description varchar(255) DEFAULT '' NOT NULL,
191 sorting int(11) DEFAULT '0' NOT NULL,
192 sc_group tinyint(4) DEFAULT '0' NOT NULL,
193 PRIMARY KEY (uid),
194 KEY event (userid)
195 );
196
197
198 #
199 # Table structure for table 'sys_news'
200 #
201 CREATE TABLE sys_news (
202 uid int(11) unsigned NOT NULL auto_increment,
203 pid int(11) unsigned DEFAULT '0' NOT NULL,
204 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
205 crdate int(11) unsigned DEFAULT '0' NOT NULL,
206 cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
207 deleted tinyint(3) unsigned DEFAULT '0' NOT NULL,
208 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
209 starttime int(11) unsigned DEFAULT '0' NOT NULL,
210 endtime int(11) unsigned DEFAULT '0' NOT NULL,
211 title varchar(255) DEFAULT '' NOT NULL,
212 content mediumtext,
213
214 PRIMARY KEY (uid),
215 KEY parent (pid)
216 );
217
218
219 #
220 # Table structure for table 'sys_filemounts'
221 #
222 CREATE TABLE sys_filemounts (
223 uid int(11) unsigned NOT NULL auto_increment,
224 pid int(11) unsigned DEFAULT '0' NOT NULL,
225 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
226 title varchar(30) DEFAULT '' NOT NULL,
227 description varchar(2000) DEFAULT '' NOT NULL,
228 path varchar(120) DEFAULT '' NOT NULL,
229 base int(11) unsigned DEFAULT '0' NOT NULL,
230 hidden tinyint(3) unsigned DEFAULT '0' NOT NULL,
231 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
232 sorting int(11) unsigned DEFAULT '0' NOT NULL,
233 read_only tinyint(1) unsigned DEFAULT '0' NOT NULL,
234 PRIMARY KEY (uid),
235 KEY parent (pid)
236 );
237
238
239 #
240 # Table structure for table 'sys_file_storage'
241 #
242 CREATE TABLE sys_file_storage (
243 uid int(11) NOT NULL auto_increment,
244 pid int(11) DEFAULT '0' NOT NULL,
245 tstamp int(11) DEFAULT '0' NOT NULL,
246 crdate int(11) DEFAULT '0' NOT NULL,
247 cruser_id int(11) DEFAULT '0' NOT NULL,
248 deleted tinyint(4) DEFAULT '0' NOT NULL,
249
250 name varchar(30) DEFAULT '' NOT NULL,
251 description text,
252 driver tinytext,
253 configuration text,
254 is_default tinyint(4) DEFAULT '0' NOT NULL,
255 is_browsable tinyint(4) DEFAULT '0' NOT NULL,
256 is_public tinyint(4) DEFAULT '0' NOT NULL,
257 is_writable tinyint(4) DEFAULT '0' NOT NULL,
258 is_online tinyint(4) DEFAULT '1' NOT NULL,
259 auto_extract_metadata tinyint(4) DEFAULT '1' NOT NULL,
260 processingfolder tinytext,
261
262 PRIMARY KEY (uid),
263 KEY parent (pid,deleted)
264 );
265
266 #
267 # Table structure for table 'sys_file'
268 #
269 CREATE TABLE sys_file (
270 uid int(11) NOT NULL auto_increment,
271 pid int(11) DEFAULT '0' NOT NULL,
272 # update timestamp of the database record, not the file!
273 tstamp int(11) DEFAULT '0' NOT NULL,
274 last_indexed int(11) DEFAULT '0' NOT NULL,
275
276 # management information
277 missing tinyint(4) DEFAULT '0' NOT NULL,
278 storage int(11) DEFAULT '0' NOT NULL,
279 type varchar(10) DEFAULT '' NOT NULL,
280 metadata int(11) DEFAULT '0' NOT NULL,
281
282 # file info data
283 identifier text,
284 identifier_hash char(40) DEFAULT '' NOT NULL,
285 folder_hash char(40) DEFAULT '' NOT NULL,
286 extension varchar(255) DEFAULT '' NOT NULL,
287 mime_type varchar(255) DEFAULT '' NOT NULL,
288 name tinytext,
289 sha1 char(40) DEFAULT '' NOT NULL,
290 size bigint(20) unsigned DEFAULT '0' NOT NULL,
291 creation_date int(11) DEFAULT '0' NOT NULL,
292 modification_date int(11) DEFAULT '0' NOT NULL,
293
294 PRIMARY KEY (uid),
295 KEY sel01 (storage,identifier_hash),
296 KEY folder (storage,folder_hash),
297 KEY tstamp (tstamp),
298 KEY lastindex (last_indexed),
299 KEY sha1 (sha1)
300 );
301
302 #
303 # Table structure for table 'sys_file_metadata'
304 #
305 CREATE TABLE sys_file_metadata (
306 uid int(11) NOT NULL auto_increment,
307 pid int(11) DEFAULT '0' NOT NULL,
308 tstamp int(11) DEFAULT '0' NOT NULL,
309 crdate int(11) DEFAULT '0' NOT NULL,
310 cruser_id int(11) DEFAULT '0' NOT NULL,
311
312 # Language fields
313 sys_language_uid int(11) DEFAULT '0' NOT NULL,
314 l10n_parent int(11) DEFAULT '0' NOT NULL,
315 l10n_diffsource mediumblob NOT NULL,
316
317 # Versioning fields
318 t3ver_oid int(11) DEFAULT '0' NOT NULL,
319 t3ver_id int(11) DEFAULT '0' NOT NULL,
320 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
321 t3ver_label varchar(30) DEFAULT '' NOT NULL,
322 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
323 t3ver_stage int(11) DEFAULT '0' NOT NULL,
324 t3ver_count int(11) DEFAULT '0' NOT NULL,
325 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
326 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
327 t3_origuid int(11) DEFAULT '0' NOT NULL,
328
329 file int(11) DEFAULT '0' NOT NULL,
330 title tinytext,
331 width int(11) DEFAULT '0' NOT NULL,
332 height int(11) DEFAULT '0' NOT NULL,
333 description text,
334 alternative text,
335
336 PRIMARY KEY (uid),
337 KEY file (file),
338 KEY t3ver_oid (t3ver_oid,t3ver_wsid),
339 KEY fal_filelist (l10n_parent,sys_language_uid)
340 );
341
342
343 #
344 # Table structure for table 'sys_file_processedfile'.
345 # which is a "temporary" file, like an image preview
346 # This table does not have a TCA representation, as it is only written
347 # to using direct SQL queries in the code
348 #
349 CREATE TABLE sys_file_processedfile (
350 uid int(11) NOT NULL auto_increment,
351 tstamp int(11) DEFAULT '0' NOT NULL,
352 crdate int(11) DEFAULT '0' NOT NULL,
353
354 storage int(11) DEFAULT '0' NOT NULL,
355 original int(11) DEFAULT '0' NOT NULL,
356 identifier varchar(512) DEFAULT '' NOT NULL,
357 name tinytext,
358 configuration text,
359 configurationsha1 char(40) DEFAULT '' NOT NULL,
360 originalfilesha1 char(40) DEFAULT '' NOT NULL,
361 task_type varchar(200) DEFAULT '' NOT NULL,
362 checksum char(10) DEFAULT '' NOT NULL,
363 width int(11) DEFAULT '0',
364 height int(11) DEFAULT '0',
365
366 PRIMARY KEY (uid),
367 KEY combined_1 (original,task_type,configurationsha1),
368 KEY identifier (storage,identifier(199))
369 );
370
371 #
372 # Table structure for table 'sys_file_reference'
373 # which is one usage of a file with overloaded metadata
374 #
375 CREATE TABLE sys_file_reference (
376 uid int(11) NOT NULL auto_increment,
377 pid int(11) DEFAULT '0' NOT NULL,
378 tstamp int(11) DEFAULT '0' NOT NULL,
379 crdate int(11) DEFAULT '0' NOT NULL,
380 cruser_id int(11) DEFAULT '0' NOT NULL,
381 sorting int(10) DEFAULT '0' NOT NULL,
382 deleted tinyint(4) DEFAULT '0' NOT NULL,
383 hidden tinyint(4) DEFAULT '0' NOT NULL,
384
385 # Versioning fields
386 t3ver_oid int(11) DEFAULT '0' NOT NULL,
387 t3ver_id int(11) DEFAULT '0' NOT NULL,
388 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
389 t3ver_label varchar(30) DEFAULT '' NOT NULL,
390 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
391 t3ver_stage int(11) DEFAULT '0' NOT NULL,
392 t3ver_count int(11) DEFAULT '0' NOT NULL,
393 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
394 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
395 t3_origuid int(11) DEFAULT '0' NOT NULL,
396
397 # Language fields
398 sys_language_uid int(11) DEFAULT '0' NOT NULL,
399 l10n_parent int(11) DEFAULT '0' NOT NULL,
400 l10n_diffsource mediumblob NOT NULL,
401
402 # Reference fields (basically same as MM table)
403 uid_local int(11) DEFAULT '0' NOT NULL,
404 uid_foreign int(11) DEFAULT '0' NOT NULL,
405 tablenames varchar(64) DEFAULT '' NOT NULL,
406 fieldname varchar(64) DEFAULT '' NOT NULL,
407 sorting_foreign int(11) DEFAULT '0' NOT NULL,
408 table_local varchar(64) DEFAULT '' NOT NULL,
409
410 # Local usage overlay fields
411 title tinytext,
412 description text,
413 alternative tinytext,
414 link varchar(1024) DEFAULT '' NOT NULL,
415 crop varchar(4000) DEFAULT '' NOT NULL,
416 autoplay tinyint(4) DEFAULT '0' NOT NULL,
417
418 PRIMARY KEY (uid),
419 KEY parent (pid,deleted),
420 KEY tablenames_fieldname (tablenames(32),fieldname(12)),
421 KEY deleted (deleted),
422 KEY uid_local (uid_local),
423 KEY uid_foreign (uid_foreign)
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,recuid),
586 KEY lookup_uid (ref_table,ref_uid),
587 KEY lookup_string (ref_string)
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,uid),
621 KEY user_auth (type,action,tstamp),
622 KEY request (request_id)
623 ) ENGINE=InnoDB;
624
625 #
626 # Table structure for table 'sys_language'
627 #
628 CREATE TABLE sys_language (
629 uid int(11) unsigned NOT NULL auto_increment,
630 pid int(11) unsigned DEFAULT '0' NOT NULL,
631 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
632 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
633 title varchar(80) DEFAULT '' NOT NULL,
634 flag varchar(20) DEFAULT '' NOT NULL,
635 language_isocode varchar(2) DEFAULT '' NOT NULL,
636 static_lang_isocode int(11) unsigned DEFAULT '0' NOT NULL,
637 sorting int(11) unsigned DEFAULT '0' NOT NULL,
638 PRIMARY KEY (uid),
639 KEY parent (pid)
640 );
641
642 #
643 # Table structure for table 'sys_category'
644 #
645 CREATE TABLE sys_category (
646 uid int(11) NOT NULL auto_increment,
647 pid int(11) DEFAULT '0' NOT NULL,
648 tstamp int(11) DEFAULT '0' NOT NULL,
649 crdate int(11) DEFAULT '0' NOT NULL,
650 cruser_id int(11) DEFAULT '0' NOT NULL,
651 deleted tinyint(4) DEFAULT '0' NOT NULL,
652 hidden tinyint(4) DEFAULT '0' NOT NULL,
653 starttime int(11) unsigned DEFAULT '0' NOT NULL,
654 endtime int(11) unsigned DEFAULT '0' NOT NULL,
655
656 t3ver_oid int(11) DEFAULT '0' NOT NULL,
657 t3ver_id int(11) DEFAULT '0' NOT NULL,
658 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
659 t3ver_label varchar(30) DEFAULT '' NOT NULL,
660 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
661 t3ver_stage int(11) DEFAULT '0' NOT NULL,
662 t3ver_count int(11) DEFAULT '0' NOT NULL,
663 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
664 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
665 t3_origuid int(11) DEFAULT '0' NOT NULL,
666 sorting int(11) unsigned DEFAULT '0' NOT NULL,
667
668 sys_language_uid int(11) DEFAULT '0' NOT NULL,
669 l10n_parent int(11) DEFAULT '0' NOT NULL,
670 l10n_diffsource mediumblob NOT NULL,
671
672 title tinytext NOT NULL,
673 description text,
674 parent int(11) DEFAULT '0' NOT NULL,
675 items int(11) DEFAULT '0' NOT NULL,
676
677 PRIMARY KEY (uid),
678 KEY parent (pid),
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 );