[BUGFIX] Use BLOB type column for ses_data in be_sessions table
[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_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 longblob,
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 varchar(6) 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 text,
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 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 target varchar(80) DEFAULT '' NOT NULL,
139 media int(11) unsigned DEFAULT '0' NOT NULL,
140 lastUpdated int(10) unsigned DEFAULT '0' NOT NULL,
141 keywords text,
142 cache_timeout int(10) unsigned DEFAULT '0' NOT NULL,
143 cache_tags varchar(255) DEFAULT '' NOT NULL,
144 newUntil int(10) unsigned DEFAULT '0' NOT NULL,
145 description text,
146 no_search tinyint(3) unsigned DEFAULT '0' NOT NULL,
147 SYS_LASTCHANGED int(10) unsigned DEFAULT '0' NOT NULL,
148 abstract text,
149 module varchar(255) DEFAULT '' NOT NULL,
150 extendToSubpages tinyint(3) unsigned DEFAULT '0' NOT NULL,
151 author varchar(255) DEFAULT '' NOT NULL,
152 author_email varchar(80) DEFAULT '' NOT NULL,
153 nav_title varchar(255) DEFAULT '' NOT NULL,
154 nav_hide tinyint(4) DEFAULT '0' NOT NULL,
155 content_from_pid int(10) unsigned DEFAULT '0' NOT NULL,
156 mount_pid int(10) unsigned DEFAULT '0' NOT NULL,
157 mount_pid_ol tinyint(4) DEFAULT '0' NOT NULL,
158 alias varchar(32) DEFAULT '' NOT NULL,
159 l18n_cfg tinyint(4) DEFAULT '0' NOT NULL,
160 fe_login_mode tinyint(4) DEFAULT '0' NOT NULL,
161 backend_layout varchar(64) DEFAULT '' NOT NULL,
162 backend_layout_next_level varchar(64) DEFAULT '' NOT NULL,
163 tsconfig_includes text,
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 description varchar(2000) DEFAULT '' NOT NULL,
229 path varchar(120) DEFAULT '' NOT NULL,
230 base int(11) unsigned DEFAULT '0' NOT NULL,
231 hidden tinyint(3) unsigned DEFAULT '0' NOT NULL,
232 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
233 sorting int(11) unsigned DEFAULT '0' NOT NULL,
234 read_only tinyint(1) unsigned DEFAULT '0' NOT NULL,
235 PRIMARY KEY (uid),
236 KEY parent (pid)
237 );
238
239
240 #
241 # Table structure for table 'sys_file_storage'
242 #
243 CREATE TABLE sys_file_storage (
244 uid int(11) NOT NULL auto_increment,
245 pid int(11) DEFAULT '0' NOT NULL,
246 tstamp int(11) DEFAULT '0' NOT NULL,
247 crdate int(11) DEFAULT '0' NOT NULL,
248 cruser_id int(11) DEFAULT '0' NOT NULL,
249 deleted tinyint(4) DEFAULT '0' NOT NULL,
250
251 name varchar(30) DEFAULT '' NOT NULL,
252 description text,
253 driver tinytext,
254 configuration text,
255 is_default tinyint(4) DEFAULT '0' NOT NULL,
256 is_browsable tinyint(4) DEFAULT '0' NOT NULL,
257 is_public tinyint(4) DEFAULT '0' NOT NULL,
258 is_writable tinyint(4) DEFAULT '0' NOT NULL,
259 is_online tinyint(4) DEFAULT '1' NOT NULL,
260 auto_extract_metadata tinyint(4) DEFAULT '1' NOT NULL,
261 processingfolder tinytext,
262
263 PRIMARY KEY (uid),
264 KEY parent (pid,deleted)
265 );
266
267 #
268 # Table structure for table 'sys_file'
269 #
270 CREATE TABLE sys_file (
271 uid int(11) NOT NULL auto_increment,
272 pid int(11) DEFAULT '0' NOT NULL,
273 # update timestamp of the database record, not the file!
274 tstamp int(11) DEFAULT '0' NOT NULL,
275 last_indexed int(11) DEFAULT '0' NOT NULL,
276
277 # management information
278 missing tinyint(4) DEFAULT '0' NOT NULL,
279 storage int(11) DEFAULT '0' NOT NULL,
280 type varchar(10) DEFAULT '' NOT NULL,
281 metadata int(11) DEFAULT '0' NOT NULL,
282
283 # file info data
284 identifier text,
285 identifier_hash char(40) DEFAULT '' NOT NULL,
286 folder_hash char(40) DEFAULT '' NOT NULL,
287 extension varchar(255) DEFAULT '' NOT NULL,
288 mime_type varchar(255) DEFAULT '' NOT NULL,
289 name tinytext,
290 sha1 char(40) DEFAULT '' NOT NULL,
291 size bigint(20) unsigned DEFAULT '0' NOT NULL,
292 creation_date int(11) DEFAULT '0' NOT NULL,
293 modification_date int(11) DEFAULT '0' NOT NULL,
294
295 PRIMARY KEY (uid),
296 KEY sel01 (storage,identifier_hash),
297 KEY folder (storage,folder_hash),
298 KEY tstamp (tstamp),
299 KEY lastindex (last_indexed),
300 KEY sha1 (sha1)
301 );
302
303 #
304 # Table structure for table 'sys_file_metadata'
305 #
306 CREATE TABLE sys_file_metadata (
307 uid int(11) NOT NULL auto_increment,
308 pid int(11) DEFAULT '0' NOT NULL,
309 tstamp int(11) DEFAULT '0' NOT NULL,
310 crdate int(11) DEFAULT '0' NOT NULL,
311 cruser_id int(11) DEFAULT '0' NOT NULL,
312
313 # Language fields
314 sys_language_uid int(11) DEFAULT '0' NOT NULL,
315 l10n_parent int(11) DEFAULT '0' NOT NULL,
316 l10n_diffsource mediumblob NOT NULL,
317
318 # Versioning fields
319 t3ver_oid int(11) DEFAULT '0' NOT NULL,
320 t3ver_id int(11) DEFAULT '0' NOT NULL,
321 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
322 t3ver_label varchar(30) DEFAULT '' NOT NULL,
323 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
324 t3ver_stage int(11) DEFAULT '0' NOT NULL,
325 t3ver_count int(11) DEFAULT '0' NOT NULL,
326 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
327 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
328 t3_origuid int(11) DEFAULT '0' NOT NULL,
329
330 file int(11) DEFAULT '0' NOT NULL,
331 title tinytext,
332 width int(11) DEFAULT '0' NOT NULL,
333 height int(11) DEFAULT '0' NOT NULL,
334 description text,
335 alternative text,
336
337 PRIMARY KEY (uid),
338 KEY file (file),
339 KEY t3ver_oid (t3ver_oid,t3ver_wsid),
340 KEY fal_filelist (l10n_parent,sys_language_uid)
341 );
342
343
344 #
345 # Table structure for table 'sys_file_processedfile'.
346 # which is a "temporary" file, like an image preview
347 # This table does not have a TCA representation, as it is only written
348 # to using direct SQL queries in the code
349 #
350 CREATE TABLE sys_file_processedfile (
351 uid int(11) NOT NULL auto_increment,
352 tstamp int(11) DEFAULT '0' NOT NULL,
353 crdate int(11) DEFAULT '0' NOT NULL,
354
355 storage int(11) DEFAULT '0' NOT NULL,
356 original int(11) DEFAULT '0' NOT NULL,
357 identifier varchar(512) DEFAULT '' NOT NULL,
358 name tinytext,
359 configuration text,
360 configurationsha1 char(40) DEFAULT '' NOT NULL,
361 originalfilesha1 char(40) DEFAULT '' NOT NULL,
362 task_type varchar(200) DEFAULT '' NOT NULL,
363 checksum char(10) DEFAULT '' NOT NULL,
364 width int(11) DEFAULT '0',
365 height int(11) DEFAULT '0',
366
367 PRIMARY KEY (uid),
368 KEY combined_1 (original,task_type,configurationsha1),
369 KEY identifier (storage,identifier(199))
370 );
371
372 #
373 # Table structure for table 'sys_file_reference'
374 # which is one usage of a file with overloaded metadata
375 #
376 CREATE TABLE sys_file_reference (
377 uid int(11) NOT NULL auto_increment,
378 pid int(11) DEFAULT '0' NOT NULL,
379 tstamp int(11) DEFAULT '0' NOT NULL,
380 crdate int(11) DEFAULT '0' NOT NULL,
381 cruser_id int(11) DEFAULT '0' NOT NULL,
382 sorting int(10) DEFAULT '0' NOT NULL,
383 deleted tinyint(4) DEFAULT '0' NOT NULL,
384 hidden tinyint(4) DEFAULT '0' NOT NULL,
385
386 # Versioning fields
387 t3ver_oid int(11) DEFAULT '0' NOT NULL,
388 t3ver_id int(11) DEFAULT '0' NOT NULL,
389 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
390 t3ver_label varchar(30) DEFAULT '' NOT NULL,
391 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
392 t3ver_stage int(11) DEFAULT '0' NOT NULL,
393 t3ver_count int(11) DEFAULT '0' NOT NULL,
394 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
395 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
396 t3_origuid int(11) DEFAULT '0' NOT NULL,
397
398 # Language fields
399 sys_language_uid int(11) DEFAULT '0' NOT NULL,
400 l10n_parent int(11) DEFAULT '0' NOT NULL,
401 l10n_diffsource mediumblob NOT NULL,
402
403 # Reference fields (basically same as MM table)
404 uid_local int(11) DEFAULT '0' NOT NULL,
405 uid_foreign int(11) DEFAULT '0' NOT NULL,
406 tablenames varchar(64) DEFAULT '' NOT NULL,
407 fieldname varchar(64) DEFAULT '' NOT NULL,
408 sorting_foreign int(11) DEFAULT '0' NOT NULL,
409 table_local varchar(64) DEFAULT '' NOT NULL,
410
411 # Local usage overlay fields
412 title tinytext,
413 description text,
414 alternative tinytext,
415 link varchar(1024) DEFAULT '' NOT NULL,
416 crop varchar(4000) DEFAULT '' NOT NULL,
417 autoplay tinyint(4) DEFAULT '0' NOT NULL,
418
419 PRIMARY KEY (uid),
420 KEY parent (pid,deleted),
421 KEY tablenames_fieldname (tablenames(32),fieldname(12)),
422 KEY deleted (deleted),
423 KEY uid_local (uid_local),
424 KEY uid_foreign (uid_foreign)
425 );
426
427
428 #
429 # Table structure for table 'sys_file_collection'
430 #
431 CREATE TABLE sys_file_collection (
432 uid int(11) NOT NULL auto_increment,
433 pid int(11) DEFAULT '0' NOT NULL,
434 tstamp int(11) DEFAULT '0' NOT NULL,
435 crdate int(11) DEFAULT '0' NOT NULL,
436 cruser_id int(11) DEFAULT '0' NOT NULL,
437 t3ver_oid int(11) DEFAULT '0' NOT NULL,
438 t3ver_id int(11) DEFAULT '0' NOT NULL,
439 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
440 t3ver_label varchar(30) DEFAULT '' NOT NULL,
441 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
442 t3ver_stage int(11) DEFAULT '0' NOT NULL,
443 t3ver_count int(11) DEFAULT '0' NOT NULL,
444 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
445 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
446 t3_origuid int(11) DEFAULT '0' NOT NULL,
447 sys_language_uid int(11) DEFAULT '0' NOT NULL,
448 l10n_parent int(11) DEFAULT '0' NOT NULL,
449 l10n_diffsource mediumtext,
450 deleted tinyint(4) DEFAULT '0' NOT NULL,
451 hidden tinyint(4) DEFAULT '0' NOT NULL,
452 starttime int(11) DEFAULT '0' NOT NULL,
453 endtime int(11) DEFAULT '0' NOT NULL,
454
455 # Actual fields
456 title tinytext,
457 description text,
458 type varchar(30) DEFAULT 'static' NOT NULL,
459
460 # for type=static
461 files int(11) DEFAULT '0' NOT NULL,
462
463 # for type=folder:
464 storage int(11) DEFAULT '0' NOT NULL,
465 folder text,
466 recursive tinyint(4) DEFAULT '0' NOT NULL,
467
468 # for type=category:
469 category int(11) DEFAULT '0' NOT NULL,
470
471 PRIMARY KEY (uid),
472 KEY parent (pid,deleted),
473 KEY t3ver_oid (t3ver_oid,t3ver_wsid)
474 );
475
476 #
477 # Table structure for table 'sys_collection'
478 #
479 CREATE TABLE sys_collection (
480 uid int(11) NOT NULL auto_increment,
481 pid int(11) DEFAULT '0' NOT NULL,
482 tstamp int(11) DEFAULT '0' NOT NULL,
483 crdate int(11) DEFAULT '0' NOT NULL,
484 cruser_id int(11) DEFAULT '0' NOT NULL,
485 t3ver_oid int(11) DEFAULT '0' NOT NULL,
486 t3ver_id int(11) DEFAULT '0' NOT NULL,
487 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
488 t3ver_label varchar(30) DEFAULT '' NOT NULL,
489 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
490 t3ver_stage int(11) DEFAULT '0' NOT NULL,
491 t3ver_count int(11) DEFAULT '0' NOT NULL,
492 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
493 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
494 t3_origuid int(11) DEFAULT '0' NOT NULL,
495 sys_language_uid int(11) DEFAULT '0' NOT NULL,
496 l10n_parent int(11) DEFAULT '0' NOT NULL,
497 l10n_diffsource mediumtext,
498 deleted tinyint(4) DEFAULT '0' NOT NULL,
499 hidden tinyint(4) DEFAULT '0' NOT NULL,
500 starttime int(11) DEFAULT '0' NOT NULL,
501 endtime int(11) DEFAULT '0' NOT NULL,
502 fe_group int(11) DEFAULT '0' NOT NULL,
503
504 title tinytext,
505 description text,
506 type varchar(32) DEFAULT 'static' NOT NULL,
507 table_name tinytext,
508 items int(11) DEFAULT '0' NOT NULL,
509
510 PRIMARY KEY (uid),
511 KEY parent (pid,deleted),
512 KEY t3ver_oid (t3ver_oid,t3ver_wsid)
513 );
514
515 #
516 # Table structure for table 'sys_collection_entries'
517 #
518 CREATE TABLE sys_collection_entries (
519 uid int(11) NOT NULL auto_increment,
520 uid_local int(11) DEFAULT '0' NOT NULL,
521 uid_foreign int(11) DEFAULT '0' NOT NULL,
522 tablenames varchar(64) DEFAULT '' NOT NULL,
523 sorting int(11) DEFAULT '0' NOT NULL,
524
525 KEY uid_local (uid_local),
526 KEY uid_foreign (uid_foreign),
527 PRIMARY KEY (uid)
528 );
529
530 #
531 # Table structure for table 'sys_history'
532 #
533 CREATE TABLE sys_history (
534 uid int(11) unsigned NOT NULL auto_increment,
535 pid int(11) unsigned DEFAULT '0' NOT NULL,
536 sys_log_uid int(11) DEFAULT '0' NOT NULL,
537 history_data mediumtext,
538 fieldlist text,
539 recuid int(11) DEFAULT '0' NOT NULL,
540 tablename varchar(255) DEFAULT '' NOT NULL,
541 tstamp int(11) DEFAULT '0' NOT NULL,
542 history_files mediumtext,
543 snapshot int(11) DEFAULT '0' NOT NULL,
544 PRIMARY KEY (uid),
545 KEY parent (pid),
546 KEY recordident_1 (tablename,recuid),
547 KEY recordident_2 (tablename,tstamp),
548 KEY sys_log_uid (sys_log_uid)
549 ) ENGINE=InnoDB;
550
551 #
552 # Table structure for table 'sys_lockedrecords'
553 #
554 CREATE TABLE sys_lockedrecords (
555 uid int(11) unsigned NOT NULL auto_increment,
556 userid int(11) unsigned DEFAULT '0' NOT NULL,
557 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
558 record_table varchar(255) DEFAULT '' NOT NULL,
559 record_uid int(11) DEFAULT '0' NOT NULL,
560 record_pid int(11) DEFAULT '0' NOT NULL,
561 username varchar(50) DEFAULT '' NOT NULL,
562 feuserid int(11) unsigned DEFAULT '0' NOT NULL,
563 PRIMARY KEY (uid),
564 KEY event (userid,tstamp)
565 );
566
567 #
568 # Table structure for table 'sys_refindex'
569 #
570 CREATE TABLE sys_refindex (
571 hash varchar(32) DEFAULT '' NOT NULL,
572 tablename varchar(255) DEFAULT '' NOT NULL,
573 recuid int(11) DEFAULT '0' NOT NULL,
574 field varchar(64) DEFAULT '' NOT NULL,
575 flexpointer varchar(255) DEFAULT '' NOT NULL,
576 softref_key varchar(30) DEFAULT '' NOT NULL,
577 softref_id varchar(40) DEFAULT '' NOT NULL,
578 sorting int(11) DEFAULT '0' NOT NULL,
579 deleted tinyint(1) DEFAULT '0' NOT NULL,
580 workspace int(11) DEFAULT '0' NOT NULL,
581 ref_table varchar(255) DEFAULT '' NOT NULL,
582 ref_uid int(11) DEFAULT '0' NOT NULL,
583 ref_string varchar(200) DEFAULT '' NOT NULL,
584
585 PRIMARY KEY (hash),
586 KEY lookup_rec (tablename,recuid),
587 KEY lookup_uid (ref_table,ref_uid),
588 KEY lookup_string (ref_string)
589 );
590
591 #
592 # Table structure for table 'sys_log'
593 #
594 CREATE TABLE sys_log (
595 uid int(11) unsigned NOT NULL auto_increment,
596 pid int(11) unsigned DEFAULT '0' NOT NULL,
597 userid int(11) unsigned DEFAULT '0' NOT NULL,
598 action tinyint(4) unsigned DEFAULT '0' NOT NULL,
599 recuid int(11) unsigned DEFAULT '0' NOT NULL,
600 tablename varchar(255) DEFAULT '' NOT NULL,
601 recpid int(11) DEFAULT '0' NOT NULL,
602 error tinyint(4) unsigned DEFAULT '0' NOT NULL,
603 details text,
604 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
605 type tinyint(3) unsigned DEFAULT '0' NOT NULL,
606 details_nr tinyint(3) DEFAULT '0' NOT NULL,
607 IP varchar(39) DEFAULT '' NOT NULL,
608 log_data text,
609 event_pid int(11) DEFAULT '-1' NOT NULL,
610 workspace int(11) DEFAULT '0' NOT NULL,
611 NEWid varchar(30) DEFAULT '' NOT NULL,
612 request_id varchar(13) DEFAULT '' NOT NULL,
613 time_micro float DEFAULT '0' NOT NULL,
614 component varchar(255) DEFAULT '' NOT NULL,
615 level tinyint(1) unsigned DEFAULT '0' NOT NULL,
616 message text,
617 data text,
618 PRIMARY KEY (uid),
619 KEY parent (pid),
620 KEY event (userid,event_pid),
621 KEY recuidIdx (recuid,uid),
622 KEY user_auth (type,action,tstamp),
623 KEY request (request_id)
624 ) ENGINE=InnoDB;
625
626 #
627 # Table structure for table 'sys_language'
628 #
629 CREATE TABLE sys_language (
630 uid int(11) unsigned NOT NULL auto_increment,
631 pid int(11) unsigned DEFAULT '0' NOT NULL,
632 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
633 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
634 title varchar(80) DEFAULT '' NOT NULL,
635 flag varchar(20) DEFAULT '' NOT NULL,
636 language_isocode varchar(2) DEFAULT '' NOT NULL,
637 static_lang_isocode int(11) unsigned DEFAULT '0' NOT NULL,
638 sorting int(11) unsigned DEFAULT '0' NOT NULL,
639 PRIMARY KEY (uid),
640 KEY parent (pid)
641 );
642
643 #
644 # Table structure for table 'sys_category'
645 #
646 CREATE TABLE sys_category (
647 uid int(11) NOT NULL auto_increment,
648 pid int(11) DEFAULT '0' NOT NULL,
649 tstamp int(11) DEFAULT '0' NOT NULL,
650 crdate int(11) DEFAULT '0' NOT NULL,
651 cruser_id int(11) DEFAULT '0' NOT NULL,
652 deleted tinyint(4) DEFAULT '0' NOT NULL,
653 hidden tinyint(4) DEFAULT '0' NOT NULL,
654 starttime int(11) unsigned DEFAULT '0' NOT NULL,
655 endtime int(11) unsigned DEFAULT '0' NOT NULL,
656
657 t3ver_oid int(11) DEFAULT '0' NOT NULL,
658 t3ver_id int(11) DEFAULT '0' NOT NULL,
659 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
660 t3ver_label varchar(30) DEFAULT '' NOT NULL,
661 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
662 t3ver_stage int(11) DEFAULT '0' NOT NULL,
663 t3ver_count int(11) DEFAULT '0' NOT NULL,
664 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
665 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
666 t3_origuid int(11) DEFAULT '0' NOT NULL,
667 sorting int(11) unsigned DEFAULT '0' NOT NULL,
668
669 sys_language_uid int(11) DEFAULT '0' NOT NULL,
670 l10n_parent int(11) DEFAULT '0' NOT NULL,
671 l10n_diffsource mediumblob NOT NULL,
672
673 title tinytext NOT NULL,
674 description text,
675 parent int(11) DEFAULT '0' NOT NULL,
676 items int(11) DEFAULT '0' NOT NULL,
677
678 PRIMARY KEY (uid),
679 KEY parent (pid),
680 KEY t3ver_oid (t3ver_oid,t3ver_wsid),
681 KEY category_parent (parent),
682 KEY category_list (pid,deleted,sys_language_uid)
683 );
684
685 #
686 # Table structure for table 'sys_category_record_mm'
687 #
688 CREATE TABLE sys_category_record_mm (
689 uid_local int(11) DEFAULT '0' NOT NULL,
690 uid_foreign int(11) DEFAULT '0' NOT NULL,
691 tablenames varchar(255) DEFAULT '' NOT NULL,
692 fieldname varchar(255) DEFAULT '' NOT NULL,
693 sorting int(11) DEFAULT '0' NOT NULL,
694 sorting_foreign int(11) DEFAULT '0' NOT NULL,
695
696 KEY uid_local_foreign (uid_local,uid_foreign),
697 KEY uid_foreign_tablefield (uid_foreign,tablenames(40),fieldname(3),sorting_foreign)
698 );