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