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