Added feature #15988: Refactor TCA definitions of table pages
[Packages/TYPO3.CMS.git] / t3lib / stddb / tables.sql
1 #
2 # TYPO3 SVN ID: $Id$
3 #
4
5 #
6 # Table structure for table 'be_groups'
7 #
8 CREATE TABLE be_groups (
9 uid int(11) unsigned NOT NULL auto_increment,
10 pid int(11) unsigned DEFAULT '0' NOT NULL,
11 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
12 title varchar(50) DEFAULT '' NOT NULL,
13 non_exclude_fields text,
14 explicit_allowdeny text,
15 allowed_languages varchar(255) DEFAULT '' NOT NULL,
16 custom_options text,
17 db_mountpoints varchar(255) DEFAULT '' NOT NULL,
18 pagetypes_select varchar(255) DEFAULT '' NOT NULL,
19 tables_select text,
20 tables_modify text,
21 crdate int(11) unsigned DEFAULT '0' NOT NULL,
22 cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
23 groupMods text,
24 file_mountpoints varchar(255) DEFAULT '' NOT NULL,
25 fileoper_perms tinyint(4) DEFAULT '0' NOT NULL,
26 hidden tinyint(1) unsigned DEFAULT '0' NOT NULL,
27 inc_access_lists tinyint(3) unsigned DEFAULT '0' NOT NULL,
28 description text,
29 lockToDomain varchar(50) DEFAULT '' NOT NULL,
30 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
31 TSconfig text,
32 subgroup varchar(255) DEFAULT '' NOT NULL,
33 hide_in_lists tinyint(4) DEFAULT '0' NOT NULL,
34 workspace_perms tinyint(3) DEFAULT '1' NOT NULL,
35 PRIMARY KEY (uid),
36 KEY parent (pid)
37 );
38
39 #
40 # Table structure for table 'be_sessions'
41 #
42 CREATE TABLE be_sessions (
43 ses_id varchar(32) DEFAULT '' NOT NULL,
44 ses_name varchar(32) DEFAULT '' NOT NULL,
45 ses_iplock varchar(39) DEFAULT '' NOT NULL,
46 ses_hashlock int(11) DEFAULT '0' NOT NULL,
47 ses_userid int(11) unsigned DEFAULT '0' NOT NULL,
48 ses_tstamp int(11) unsigned DEFAULT '0' NOT NULL,
49 ses_data longtext,
50 ses_backuserid int(11) NOT NULL default '0',
51 PRIMARY KEY (ses_id,ses_name)
52 );
53
54 #
55 # Table structure for table 'be_users'
56 #
57 CREATE TABLE be_users (
58 uid int(11) unsigned NOT NULL auto_increment,
59 pid int(11) unsigned DEFAULT '0' NOT NULL,
60 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
61 username varchar(50) DEFAULT '' NOT NULL,
62 password varchar(40) DEFAULT '' NOT NULL,
63 admin tinyint(4) unsigned DEFAULT '0' NOT NULL,
64 usergroup varchar(255) DEFAULT '' NOT NULL,
65 disable tinyint(1) unsigned DEFAULT '0' NOT NULL,
66 starttime int(11) unsigned DEFAULT '0' NOT NULL,
67 endtime int(11) unsigned DEFAULT '0' NOT NULL,
68 lang char(2) DEFAULT '' NOT NULL,
69 email varchar(80) DEFAULT '' NOT NULL,
70 db_mountpoints varchar(255) DEFAULT '' NOT NULL,
71 options tinyint(4) unsigned DEFAULT '0' NOT NULL,
72 crdate int(11) unsigned DEFAULT '0' NOT NULL,
73 cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
74 realName varchar(80) DEFAULT '' NOT NULL,
75 userMods varchar(255) DEFAULT '' NOT NULL,
76 allowed_languages varchar(255) DEFAULT '' NOT NULL,
77 uc text,
78 file_mountpoints varchar(255) DEFAULT '' NOT NULL,
79 fileoper_perms tinyint(4) DEFAULT '0' NOT NULL,
80 workspace_perms tinyint(3) DEFAULT '1' NOT NULL,
81 lockToDomain varchar(50) DEFAULT '' NOT NULL,
82 disableIPlock tinyint(1) unsigned DEFAULT '0' NOT NULL,
83 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
84 TSconfig text,
85 lastlogin int(10) unsigned DEFAULT '0' NOT NULL,
86 createdByAction int(11) DEFAULT '0' NOT NULL,
87 usergroup_cached_list varchar(255) DEFAULT '' NOT NULL,
88 workspace_id int(11) DEFAULT '0' NOT NULL,
89 workspace_preview tinyint(3) DEFAULT '1' NOT NULL,
90 PRIMARY KEY (uid),
91 KEY parent (pid),
92 KEY username (username)
93 );
94
95 #
96 # Table structure for table 'cache_extensions'
97 #
98 CREATE TABLE cache_extensions (
99 extkey varchar(60) NOT NULL default '',
100 version varchar(10) NOT NULL default '',
101 alldownloadcounter int(11) unsigned NOT NULL default '0',
102 downloadcounter int(11) unsigned NOT NULL default '0',
103 title varchar(150) NOT NULL default '',
104 description mediumtext,
105 state int(4) NOT NULL default '0',
106 reviewstate int(4) NOT NULL default '0',
107 category int(4) NOT NULL default '0',
108 lastuploaddate int(11) unsigned NOT NULL default '0',
109 dependencies mediumtext,
110 authorname varchar(100) NOT NULL default '',
111 authoremail varchar(100) NOT NULL default '',
112 ownerusername varchar(50) NOT NULL default '',
113 t3xfilemd5 varchar(35) NOT NULL default '',
114 uploadcomment mediumtext,
115 authorcompany varchar(100) NOT NULL default '',
116 intversion int(11) NOT NULL default '0',
117 lastversion int(3) NOT NULL default '0',
118 lastreviewedversion int(3) NOT NULL default '0',
119 PRIMARY KEY (extkey,version)
120 );
121
122 #
123 # Table structure for table 'cache_hash'
124 #
125 CREATE TABLE cache_hash (
126 id int(11) unsigned NOT NULL auto_increment,
127 hash varchar(32) DEFAULT '' NOT NULL,
128 content mediumblob,
129 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
130 ident varchar(32) DEFAULT '' NOT NULL,
131 PRIMARY KEY (id),
132 KEY hash (hash)
133 ) ENGINE=InnoDB;
134
135
136 #
137 # Table structure for table 'cachingframework_cache_hash'
138 #
139 CREATE TABLE cachingframework_cache_hash (
140 id int(11) unsigned NOT NULL auto_increment,
141 identifier varchar(128) DEFAULT '' NOT NULL,
142 crdate int(11) unsigned DEFAULT '0' NOT NULL,
143 content mediumblob,
144 lifetime int(11) unsigned DEFAULT '0' NOT NULL,
145 PRIMARY KEY (id),
146 KEY cache_id (identifier)
147 ) ENGINE=InnoDB;
148
149
150 #
151 # Table structure for table 'cachingframework_cache_hash_tags'
152 #
153 CREATE TABLE cachingframework_cache_hash_tags (
154 id int(11) unsigned NOT NULL auto_increment,
155 identifier varchar(128) DEFAULT '' NOT NULL,
156 tag varchar(128) DEFAULT '' NOT NULL,
157 PRIMARY KEY (id),
158 KEY cache_id (identifier),
159 KEY cache_tag (tag)
160 ) ENGINE=InnoDB;
161
162
163 #
164 # Table structure for table 'cache_imagesizes'
165 #
166 CREATE TABLE cache_imagesizes (
167 md5hash varchar(32) DEFAULT '' NOT NULL,
168 md5filename varchar(32) DEFAULT '' NOT NULL,
169 tstamp int(11) DEFAULT '0' NOT NULL,
170 filename varchar(255) DEFAULT '' NOT NULL,
171 imagewidth mediumint(11) unsigned DEFAULT '0' NOT NULL,
172 imageheight mediumint(11) unsigned DEFAULT '0' NOT NULL,
173 PRIMARY KEY (md5filename)
174 ) ENGINE=InnoDB;
175
176 #
177 # Table structure for table 'pages'
178 #
179 CREATE TABLE pages (
180 uid int(11) NOT NULL auto_increment,
181 pid int(11) DEFAULT '0' NOT NULL,
182 t3ver_oid int(11) DEFAULT '0' NOT NULL,
183 t3ver_id int(11) DEFAULT '0' NOT NULL,
184 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
185 t3ver_label varchar(255) DEFAULT '' NOT NULL,
186 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
187 t3ver_stage tinyint(4) DEFAULT '0' NOT NULL,
188 t3ver_count int(11) DEFAULT '0' NOT NULL,
189 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
190 t3ver_swapmode tinyint(4) DEFAULT '0' NOT NULL,
191 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
192 t3_origuid int(11) DEFAULT '0' NOT NULL,
193 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
194 sorting int(11) unsigned DEFAULT '0' NOT NULL,
195 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
196 perms_userid int(11) unsigned DEFAULT '0' NOT NULL,
197 perms_groupid int(11) unsigned DEFAULT '0' NOT NULL,
198 perms_user tinyint(4) unsigned DEFAULT '0' NOT NULL,
199 perms_group tinyint(4) unsigned DEFAULT '0' NOT NULL,
200 perms_everybody tinyint(4) unsigned DEFAULT '0' NOT NULL,
201 editlock tinyint(4) unsigned DEFAULT '0' NOT NULL,
202 crdate int(11) unsigned DEFAULT '0' NOT NULL,
203 cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
204 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
205 title varchar(255) DEFAULT '' NOT NULL,
206 doktype tinyint(3) unsigned DEFAULT '0' NOT NULL,
207 TSconfig text,
208 storage_pid int(11) DEFAULT '0' NOT NULL,
209 is_siteroot tinyint(4) DEFAULT '0' NOT NULL,
210 php_tree_stop tinyint(4) DEFAULT '0' NOT NULL,
211 tx_impexp_origuid int(11) DEFAULT '0' NOT NULL,
212 url varchar(255) DEFAULT '' NOT NULL,
213 starttime int(11) unsigned DEFAULT '0' NOT NULL,
214 endtime int(11) unsigned DEFAULT '0' NOT NULL,
215 urltype tinyint(4) unsigned DEFAULT '0' NOT NULL,
216 shortcut int(10) unsigned DEFAULT '0' NOT NULL,
217 shortcut_mode int(10) unsigned DEFAULT '0' NOT NULL,
218 no_cache int(10) unsigned DEFAULT '0' NOT NULL,
219 fe_group varchar(100) DEFAULT '0' NOT NULL,
220 subtitle varchar(255) DEFAULT '' NOT NULL,
221 layout tinyint(3) unsigned DEFAULT '0' NOT NULL,
222 url_scheme tinyint(3) unsigned DEFAULT '0' NOT NULL,
223 target varchar(80) DEFAULT '' NOT NULL,
224 media text,
225 lastUpdated int(10) unsigned DEFAULT '0' NOT NULL,
226 keywords text,
227 cache_timeout int(10) unsigned DEFAULT '0' NOT NULL,
228 newUntil int(10) unsigned DEFAULT '0' NOT NULL,
229 description text,
230 no_search tinyint(3) unsigned DEFAULT '0' NOT NULL,
231 SYS_LASTCHANGED int(10) unsigned DEFAULT '0' NOT NULL,
232 abstract text,
233 module varchar(10) DEFAULT '' NOT NULL,
234 extendToSubpages tinyint(3) unsigned DEFAULT '0' NOT NULL,
235 author varchar(255) DEFAULT '' NOT NULL,
236 author_email varchar(80) DEFAULT '' NOT NULL,
237 nav_title varchar(255) DEFAULT '' NOT NULL,
238 nav_hide tinyint(4) DEFAULT '0' NOT NULL,
239 content_from_pid int(10) unsigned DEFAULT '0' NOT NULL,
240 mount_pid int(10) unsigned DEFAULT '0' NOT NULL,
241 mount_pid_ol tinyint(4) DEFAULT '0' NOT NULL,
242 alias varchar(32) DEFAULT '' NOT NULL,
243 l18n_cfg tinyint(4) DEFAULT '0' NOT NULL,
244 fe_login_mode tinyint(4) DEFAULT '0' NOT NULL,
245 PRIMARY KEY (uid),
246 KEY t3ver_oid (t3ver_oid,t3ver_wsid),
247 KEY parent (pid,sorting,deleted,hidden),
248 KEY alias (alias)
249 );
250
251 #
252 # Table structure for table 'sys_registry'
253 #
254 CREATE TABLE sys_registry (
255 uid int(11) unsigned NOT NULL auto_increment,
256 entry_namespace varchar(128) DEFAULT '' NOT NULL,
257 entry_key varchar(128) DEFAULT '' NOT NULL,
258 entry_value blob,
259 PRIMARY KEY (uid),
260 UNIQUE KEY entry_identifier (entry_namespace,entry_key)
261 );
262
263 #
264 # Table structure for table 'sys_be_shortcuts'
265 #
266 CREATE TABLE sys_be_shortcuts (
267 uid int(11) unsigned NOT NULL auto_increment,
268 userid int(11) unsigned DEFAULT '0' NOT NULL,
269 module_name varchar(255) DEFAULT '' NOT NULL,
270 url text,
271 description varchar(255) DEFAULT '' NOT NULL,
272 sorting int(11) DEFAULT '0' NOT NULL,
273 sc_group tinyint(4) DEFAULT '0' NOT NULL,
274 PRIMARY KEY (uid),
275 KEY event (userid)
276 );
277
278
279 #
280 # Table structure for table 'sys_news'
281 #
282 CREATE TABLE sys_news (
283 uid int(11) unsigned NOT NULL auto_increment,
284 pid int(11) unsigned DEFAULT '0' NOT NULL,
285 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
286 crdate int(11) unsigned DEFAULT '0' NOT NULL,
287 cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
288 deleted tinyint(3) unsigned DEFAULT '0' NOT NULL,
289 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
290 starttime int(11) unsigned DEFAULT '0' NOT NULL,
291 endtime int(11) unsigned DEFAULT '0' NOT NULL,
292 title varchar(255) DEFAULT '' NOT NULL,
293 content mediumtext,
294
295 PRIMARY KEY (uid),
296 KEY parent (pid)
297 );
298
299
300 #
301 # Table structure for table 'sys_preview'
302 #
303 CREATE TABLE sys_preview (
304 keyword varchar(32) DEFAULT '' NOT NULL,
305 tstamp int(11) DEFAULT '0' NOT NULL,
306 endtime int(11) DEFAULT '0' NOT NULL,
307 config text,
308 PRIMARY KEY (keyword)
309 );
310
311
312 #
313 # Table structure for table 'sys_filemounts'
314 #
315 CREATE TABLE sys_filemounts (
316 uid int(11) unsigned NOT NULL auto_increment,
317 pid int(11) unsigned DEFAULT '0' NOT NULL,
318 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
319 title varchar(30) DEFAULT '' NOT NULL,
320 path varchar(120) DEFAULT '' NOT NULL,
321 base tinyint(4) unsigned DEFAULT '0' NOT NULL,
322 hidden tinyint(3) unsigned DEFAULT '0' NOT NULL,
323 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
324 sorting int(11) unsigned DEFAULT '0' NOT NULL,
325 PRIMARY KEY (uid),
326 KEY parent (pid)
327 );
328
329 #
330 # Table structure for table 'sys_workspace'
331 #
332 CREATE TABLE sys_workspace (
333 uid int(11) NOT NULL auto_increment,
334 pid int(11) DEFAULT '0' NOT NULL,
335 tstamp int(11) DEFAULT '0' NOT NULL,
336 deleted tinyint(1) DEFAULT '0' NOT NULL,
337 title varchar(30) DEFAULT '' NOT NULL,
338 description varchar(255) DEFAULT '' NOT NULL,
339 adminusers varchar(255) DEFAULT '' NOT NULL,
340 members text,
341 reviewers text,
342 db_mountpoints varchar(255) DEFAULT '' NOT NULL,
343 file_mountpoints varchar(255) DEFAULT '' NOT NULL,
344 publish_time int(11) DEFAULT '0' NOT NULL,
345 unpublish_time int(11) DEFAULT '0' NOT NULL,
346 freeze tinyint(3) DEFAULT '0' NOT NULL,
347 live_edit tinyint(3) DEFAULT '0' NOT NULL,
348 review_stage_edit tinyint(3) DEFAULT '0' NOT NULL,
349 vtypes tinyint(3) DEFAULT '0' NOT NULL,
350 disable_autocreate tinyint(1) DEFAULT '0' NOT NULL,
351 swap_modes tinyint(3) DEFAULT '0' NOT NULL,
352 publish_access tinyint(3) DEFAULT '0' NOT NULL,
353 stagechg_notification tinyint(3) DEFAULT '0' NOT NULL,
354
355 PRIMARY KEY (uid),
356 KEY parent (pid)
357 );
358
359 #
360 # Table structure for table 'sys_history'
361 #
362 CREATE TABLE sys_history (
363 uid int(11) unsigned NOT NULL auto_increment,
364 sys_log_uid int(11) DEFAULT '0' NOT NULL,
365 history_data mediumtext,
366 fieldlist text,
367 recuid int(11) DEFAULT '0' NOT NULL,
368 tablename varchar(255) DEFAULT '' NOT NULL,
369 tstamp int(11) DEFAULT '0' NOT NULL,
370 history_files mediumtext,
371 snapshot tinyint(4) DEFAULT '0' NOT NULL,
372 PRIMARY KEY (uid),
373 KEY recordident (tablename,recuid,tstamp),
374 KEY sys_log_uid (sys_log_uid)
375 );
376
377 #
378 # Table structure for table 'sys_lockedrecords'
379 #
380 CREATE TABLE sys_lockedrecords (
381 uid int(11) unsigned NOT NULL auto_increment,
382 userid int(11) unsigned DEFAULT '0' NOT NULL,
383 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
384 record_table varchar(255) DEFAULT '' NOT NULL,
385 record_uid int(11) DEFAULT '0' NOT NULL,
386 record_pid int(11) DEFAULT '0' NOT NULL,
387 username varchar(50) DEFAULT '' NOT NULL,
388 feuserid int(11) unsigned DEFAULT '0' NOT NULL,
389 PRIMARY KEY (uid),
390 KEY event (userid,tstamp)
391 );
392
393 #
394 # Table structure for table 'sys_refindex'
395 #
396 CREATE TABLE sys_refindex (
397 hash varchar(32) DEFAULT '' NOT NULL,
398 tablename varchar(255) DEFAULT '' NOT NULL,
399 recuid int(11) DEFAULT '0' NOT NULL,
400 field varchar(40) DEFAULT '' NOT NULL,
401 flexpointer varchar(255) DEFAULT '' NOT NULL,
402 softref_key varchar(30) DEFAULT '' NOT NULL,
403 softref_id varchar(40) DEFAULT '' NOT NULL,
404 sorting int(11) DEFAULT '0' NOT NULL,
405 deleted tinyint(1) DEFAULT '0' NOT NULL,
406 ref_table varchar(255) DEFAULT '' NOT NULL,
407 ref_uid int(11) DEFAULT '0' NOT NULL,
408 ref_string varchar(200) DEFAULT '' NOT NULL,
409
410 PRIMARY KEY (hash),
411 KEY lookup_rec (tablename,recuid),
412 KEY lookup_uid (ref_table,ref_uid),
413 KEY lookup_string (ref_string)
414 );
415
416 #
417 # Table structure for table 'sys_refindex_words'
418 #
419 CREATE TABLE sys_refindex_words (
420 wid int(11) DEFAULT '0' NOT NULL,
421 baseword varchar(60) DEFAULT '' NOT NULL,
422 PRIMARY KEY (wid)
423 );
424
425 #
426 # Table structure for table 'sys_refindex_rel'
427 #
428 CREATE TABLE sys_refindex_rel (
429 rid int(11) DEFAULT '0' NOT NULL,
430 wid int(11) DEFAULT '0' NOT NULL,
431 PRIMARY KEY (rid,wid)
432 );
433
434
435 #
436 # Table structure for table 'sys_refindex_res'
437 #
438 CREATE TABLE sys_refindex_res (
439 rid int(11) DEFAULT '0' NOT NULL,
440 tablename varchar(255) DEFAULT '' NOT NULL,
441 recuid int(11) DEFAULT '0' NOT NULL,
442 PRIMARY KEY (rid)
443 );
444
445 #
446 # Table structure for table 'sys_log'
447 #
448 CREATE TABLE sys_log (
449 uid int(11) unsigned NOT NULL auto_increment,
450 userid int(11) unsigned DEFAULT '0' NOT NULL,
451 action tinyint(4) unsigned DEFAULT '0' NOT NULL,
452 recuid int(11) unsigned DEFAULT '0' NOT NULL,
453 tablename varchar(255) DEFAULT '' NOT NULL,
454 recpid int(11) DEFAULT '0' NOT NULL,
455 error tinyint(4) unsigned DEFAULT '0' NOT NULL,
456 details text NOT NULL,
457 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
458 type tinyint(3) unsigned DEFAULT '0' NOT NULL,
459 details_nr tinyint(3) unsigned DEFAULT '0' NOT NULL,
460 IP varchar(39) DEFAULT '' NOT NULL,
461 log_data varchar(255) DEFAULT '' NOT NULL,
462 event_pid int(11) DEFAULT '-1' NOT NULL,
463 workspace int(11) DEFAULT '0' NOT NULL,
464 NEWid varchar(20) DEFAULT '' NOT NULL,
465 PRIMARY KEY (uid),
466 KEY event (userid,event_pid),
467 KEY recuidIdx (recuid,uid)
468 ) ENGINE=InnoDB;
469
470 #
471 # Table structure for table 'sys_language'
472 #
473 CREATE TABLE sys_language (
474 uid int(11) unsigned NOT NULL auto_increment,
475 pid int(11) unsigned DEFAULT '0' NOT NULL,
476 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
477 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
478 title varchar(80) DEFAULT '' NOT NULL,
479 flag varchar(20) DEFAULT '' NOT NULL,
480 static_lang_isocode int(11) unsigned DEFAULT '0' NOT NULL,
481 PRIMARY KEY (uid),
482 KEY parent (pid)
483 );