[TASK] Sane index length for "uid_foreign_tablefield"
[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 text,
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 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 char(2) 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 mediumtext,
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 varchar(255) DEFAULT '' NOT NULL,
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 storage_pid int(11) DEFAULT '0' NOT NULL,
125 is_siteroot tinyint(4) DEFAULT '0' NOT NULL,
126 php_tree_stop tinyint(4) DEFAULT '0' NOT NULL,
127 tx_impexp_origuid int(11) DEFAULT '0' NOT NULL,
128 url varchar(255) DEFAULT '' NOT NULL,
129 starttime int(11) unsigned DEFAULT '0' NOT NULL,
130 endtime int(11) unsigned DEFAULT '0' NOT NULL,
131 urltype tinyint(4) unsigned DEFAULT '0' NOT NULL,
132 shortcut int(10) unsigned DEFAULT '0' NOT NULL,
133 shortcut_mode int(10) unsigned DEFAULT '0' NOT NULL,
134 no_cache int(10) unsigned DEFAULT '0' NOT NULL,
135 fe_group varchar(100) DEFAULT '0' NOT NULL,
136 subtitle varchar(255) DEFAULT '' NOT NULL,
137 layout int(11) unsigned DEFAULT '0' NOT NULL,
138 url_scheme tinyint(3) unsigned DEFAULT '0' NOT NULL,
139 target varchar(80) DEFAULT '' NOT NULL,
140 media text,
141 lastUpdated int(10) unsigned DEFAULT '0' NOT NULL,
142 keywords text,
143 cache_timeout int(10) unsigned DEFAULT '0' NOT NULL,
144 cache_tags varchar(255) DEFAULT '' NOT NULL,
145 newUntil int(10) unsigned DEFAULT '0' NOT NULL,
146 description text,
147 no_search tinyint(3) unsigned DEFAULT '0' NOT NULL,
148 SYS_LASTCHANGED int(10) unsigned DEFAULT '0' NOT NULL,
149 abstract text,
150 module varchar(10) DEFAULT '' NOT NULL,
151 extendToSubpages tinyint(3) unsigned DEFAULT '0' NOT NULL,
152 author varchar(255) DEFAULT '' NOT NULL,
153 author_email varchar(80) DEFAULT '' NOT NULL,
154 nav_title varchar(255) DEFAULT '' NOT NULL,
155 nav_hide tinyint(4) DEFAULT '0' NOT NULL,
156 content_from_pid int(10) unsigned DEFAULT '0' NOT NULL,
157 mount_pid int(10) unsigned DEFAULT '0' NOT NULL,
158 mount_pid_ol tinyint(4) DEFAULT '0' NOT NULL,
159 alias varchar(32) DEFAULT '' NOT NULL,
160 l18n_cfg tinyint(4) DEFAULT '0' NOT NULL,
161 fe_login_mode tinyint(4) DEFAULT '0' NOT NULL,
162 backend_layout varchar(64) DEFAULT '' NOT NULL,
163 backend_layout_next_level varchar(64) DEFAULT '' NOT NULL,
164 PRIMARY KEY (uid),
165 KEY t3ver_oid (t3ver_oid,t3ver_wsid),
166 KEY parent (pid,deleted,sorting),
167 KEY alias (alias),
168 KEY determineSiteRoot (is_siteroot)
169 );
170
171 #
172 # Table structure for table 'sys_registry'
173 #
174 CREATE TABLE sys_registry (
175 uid int(11) unsigned NOT NULL auto_increment,
176 entry_namespace varchar(128) DEFAULT '' NOT NULL,
177 entry_key varchar(128) DEFAULT '' NOT NULL,
178 entry_value blob,
179 PRIMARY KEY (uid),
180 UNIQUE KEY entry_identifier (entry_namespace,entry_key)
181 );
182
183 #
184 # Table structure for table 'sys_be_shortcuts'
185 #
186 CREATE TABLE sys_be_shortcuts (
187 uid int(11) unsigned NOT NULL auto_increment,
188 userid int(11) unsigned DEFAULT '0' NOT NULL,
189 module_name varchar(255) DEFAULT '' NOT NULL,
190 url text,
191 description varchar(255) DEFAULT '' NOT NULL,
192 sorting int(11) DEFAULT '0' NOT NULL,
193 sc_group tinyint(4) DEFAULT '0' NOT NULL,
194 PRIMARY KEY (uid),
195 KEY event (userid)
196 );
197
198
199 #
200 # Table structure for table 'sys_news'
201 #
202 CREATE TABLE sys_news (
203 uid int(11) unsigned NOT NULL auto_increment,
204 pid int(11) unsigned DEFAULT '0' NOT NULL,
205 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
206 crdate int(11) unsigned DEFAULT '0' NOT NULL,
207 cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
208 deleted tinyint(3) unsigned DEFAULT '0' NOT NULL,
209 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
210 starttime int(11) unsigned DEFAULT '0' NOT NULL,
211 endtime int(11) unsigned DEFAULT '0' NOT NULL,
212 title varchar(255) DEFAULT '' NOT NULL,
213 content mediumtext,
214
215 PRIMARY KEY (uid),
216 KEY parent (pid)
217 );
218
219
220 #
221 # Table structure for table 'sys_filemounts'
222 #
223 CREATE TABLE sys_filemounts (
224 uid int(11) unsigned NOT NULL auto_increment,
225 pid int(11) unsigned DEFAULT '0' NOT NULL,
226 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
227 title varchar(30) 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 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 NOT NULL,
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 NOT NULL,
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 tinytext,
413 link varchar(1024) DEFAULT '' NOT NULL,
414 downloadname tinytext,
415 crop varchar(4000) DEFAULT '' 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_foreign (uid_foreign)
422 );
423
424
425 #
426 # Table structure for table 'sys_file_collection'
427 #
428 CREATE TABLE sys_file_collection (
429 uid int(11) NOT NULL auto_increment,
430 pid int(11) DEFAULT '0' NOT NULL,
431 tstamp int(11) DEFAULT '0' NOT NULL,
432 crdate int(11) DEFAULT '0' NOT NULL,
433 cruser_id int(11) DEFAULT '0' NOT NULL,
434 t3ver_oid int(11) DEFAULT '0' NOT NULL,
435 t3ver_id int(11) DEFAULT '0' NOT NULL,
436 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
437 t3ver_label varchar(30) DEFAULT '' NOT NULL,
438 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
439 t3ver_stage int(11) DEFAULT '0' NOT NULL,
440 t3ver_count int(11) DEFAULT '0' NOT NULL,
441 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
442 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
443 t3_origuid int(11) DEFAULT '0' NOT NULL,
444 sys_language_uid int(11) DEFAULT '0' NOT NULL,
445 l10n_parent int(11) DEFAULT '0' NOT NULL,
446 l10n_diffsource mediumtext,
447 deleted tinyint(4) DEFAULT '0' NOT NULL,
448 hidden tinyint(4) DEFAULT '0' NOT NULL,
449 starttime int(11) DEFAULT '0' NOT NULL,
450 endtime int(11) DEFAULT '0' NOT NULL,
451
452 # Actual fields
453 title tinytext,
454 description text,
455 type varchar(30) DEFAULT 'static' NOT NULL,
456
457 # for type=static
458 files int(11) DEFAULT '0' NOT NULL,
459
460 # for type=folder:
461 storage int(11) DEFAULT '0' NOT NULL,
462 folder text 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 int(11) 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 sys_log_uid int(11) DEFAULT '0' NOT NULL,
533 history_data mediumtext,
534 fieldlist text,
535 recuid int(11) DEFAULT '0' NOT NULL,
536 tablename varchar(255) DEFAULT '' NOT NULL,
537 tstamp int(11) DEFAULT '0' NOT NULL,
538 history_files mediumtext,
539 snapshot int(11) DEFAULT '0' NOT NULL,
540 PRIMARY KEY (uid),
541 KEY parent (pid),
542 KEY recordident_1 (tablename,recuid),
543 KEY recordident_2 (tablename,tstamp),
544 KEY sys_log_uid (sys_log_uid)
545 ) ENGINE=InnoDB;
546
547 #
548 # Table structure for table 'sys_lockedrecords'
549 #
550 CREATE TABLE sys_lockedrecords (
551 uid int(11) unsigned NOT NULL auto_increment,
552 userid int(11) unsigned DEFAULT '0' NOT NULL,
553 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
554 record_table varchar(255) DEFAULT '' NOT NULL,
555 record_uid int(11) DEFAULT '0' NOT NULL,
556 record_pid int(11) DEFAULT '0' NOT NULL,
557 username varchar(50) DEFAULT '' NOT NULL,
558 feuserid int(11) unsigned DEFAULT '0' NOT NULL,
559 PRIMARY KEY (uid),
560 KEY event (userid,tstamp)
561 );
562
563 #
564 # Table structure for table 'sys_refindex'
565 #
566 CREATE TABLE sys_refindex (
567 hash varchar(32) DEFAULT '' NOT NULL,
568 tablename varchar(255) DEFAULT '' NOT NULL,
569 recuid int(11) DEFAULT '0' NOT NULL,
570 field varchar(40) DEFAULT '' NOT NULL,
571 flexpointer varchar(255) DEFAULT '' NOT NULL,
572 softref_key varchar(30) DEFAULT '' NOT NULL,
573 softref_id varchar(40) DEFAULT '' NOT NULL,
574 sorting int(11) DEFAULT '0' NOT NULL,
575 deleted tinyint(1) DEFAULT '0' NOT NULL,
576 workspace int(11) DEFAULT '0' NOT NULL,
577 ref_table varchar(255) DEFAULT '' NOT NULL,
578 ref_uid int(11) DEFAULT '0' NOT NULL,
579 ref_string varchar(200) DEFAULT '' NOT NULL,
580
581 PRIMARY KEY (hash),
582 KEY lookup_rec (tablename,recuid),
583 KEY lookup_uid (ref_table,ref_uid),
584 KEY lookup_string (ref_string)
585 );
586
587 #
588 # Table structure for table 'sys_log'
589 #
590 CREATE TABLE sys_log (
591 uid int(11) unsigned NOT NULL auto_increment,
592 pid int(11) unsigned DEFAULT '0' NOT NULL,
593 userid int(11) unsigned DEFAULT '0' NOT NULL,
594 action tinyint(4) unsigned DEFAULT '0' NOT NULL,
595 recuid int(11) unsigned DEFAULT '0' NOT NULL,
596 tablename varchar(255) DEFAULT '' NOT NULL,
597 recpid int(11) DEFAULT '0' NOT NULL,
598 error tinyint(4) unsigned DEFAULT '0' NOT NULL,
599 details text NOT NULL,
600 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
601 type tinyint(3) unsigned DEFAULT '0' NOT NULL,
602 details_nr tinyint(3) unsigned DEFAULT '0' NOT NULL,
603 IP varchar(39) DEFAULT '' NOT NULL,
604 log_data text,
605 event_pid int(11) DEFAULT '-1' NOT NULL,
606 workspace int(11) DEFAULT '0' NOT NULL,
607 NEWid varchar(20) DEFAULT '' NOT NULL,
608 request_id varchar(13) DEFAULT '' NOT NULL,
609 time_micro float DEFAULT '0' NOT NULL,
610 component varchar(255) DEFAULT '' NOT NULL,
611 level tinyint(1) unsigned DEFAULT '0' NOT NULL,
612 message text,
613 data text,
614 PRIMARY KEY (uid),
615 KEY parent (pid),
616 KEY event (userid,event_pid),
617 KEY recuidIdx (recuid,uid),
618 KEY user_auth (type,action,tstamp),
619 KEY request (request_id)
620 ) ENGINE=InnoDB;
621
622 #
623 # Table structure for table 'sys_language'
624 #
625 CREATE TABLE sys_language (
626 uid int(11) unsigned NOT NULL auto_increment,
627 pid int(11) unsigned DEFAULT '0' NOT NULL,
628 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
629 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
630 title varchar(80) DEFAULT '' NOT NULL,
631 flag varchar(20) DEFAULT '' NOT NULL,
632 language_isocode varchar(2) DEFAULT '' NOT NULL,
633 static_lang_isocode int(11) unsigned DEFAULT '0' NOT NULL,
634 PRIMARY KEY (uid),
635 KEY parent (pid)
636 );
637
638 #
639 # Table structure for table 'sys_category'
640 #
641 CREATE TABLE sys_category (
642 uid int(11) NOT NULL auto_increment,
643 pid int(11) DEFAULT '0' NOT NULL,
644 tstamp int(11) DEFAULT '0' NOT NULL,
645 crdate int(11) DEFAULT '0' NOT NULL,
646 cruser_id int(11) DEFAULT '0' NOT NULL,
647 deleted tinyint(4) DEFAULT '0' NOT NULL,
648 hidden tinyint(4) DEFAULT '0' NOT NULL,
649 starttime int(11) unsigned DEFAULT '0' NOT NULL,
650 endtime int(11) unsigned DEFAULT '0' NOT NULL,
651
652 t3ver_oid int(11) DEFAULT '0' NOT NULL,
653 t3ver_id int(11) DEFAULT '0' NOT NULL,
654 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
655 t3ver_label varchar(30) DEFAULT '' NOT NULL,
656 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
657 t3ver_stage int(11) DEFAULT '0' NOT NULL,
658 t3ver_count int(11) DEFAULT '0' NOT NULL,
659 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
660 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
661 t3_origuid int(11) DEFAULT '0' NOT NULL,
662 sorting int(11) unsigned DEFAULT '0' NOT NULL,
663
664 sys_language_uid int(11) DEFAULT '0' NOT NULL,
665 l10n_parent int(11) DEFAULT '0' NOT NULL,
666 l10n_diffsource mediumblob NOT NULL,
667
668 title tinytext NOT NULL,
669 description text NOT NULL,
670 parent int(11) DEFAULT '0' NOT NULL,
671 items int(11) DEFAULT '0' NOT NULL,
672
673 PRIMARY KEY (uid),
674 KEY parent (pid),
675 KEY t3ver_oid (t3ver_oid,t3ver_wsid),
676 KEY category_parent (parent),
677 KEY category_list (pid,deleted,sys_language_uid)
678 );
679
680 #
681 # Table structure for table 'sys_category_record_mm'
682 #
683 CREATE TABLE sys_category_record_mm (
684 uid_local int(11) DEFAULT '0' NOT NULL,
685 uid_foreign int(11) DEFAULT '0' NOT NULL,
686 tablenames varchar(255) DEFAULT '' NOT NULL,
687 fieldname varchar(255) DEFAULT '' NOT NULL,
688 sorting int(11) DEFAULT '0' NOT NULL,
689 sorting_foreign int(11) DEFAULT '0' NOT NULL,
690
691 KEY uid_local_foreign (uid_local,uid_foreign),
692 KEY uid_foreign_tablefield (uid_foreign,tablenames(40),fieldname(3),sorting_foreign)
693 );