Added feature #11438: Add a registry to t3lib
[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 identifier varchar(250) DEFAULT '' NOT NULL,
128 crdate int(11) unsigned DEFAULT '0' NOT NULL,
129 content mediumtext,
130 tags mediumtext,
131 lifetime int(11) unsigned DEFAULT '0' NOT NULL,
132 PRIMARY KEY (id),
133 KEY cache_id (identifier)
134 ) ENGINE=InnoDB;
135
136 #
137 # Table structure for table 'cache_imagesizes'
138 #
139 CREATE TABLE cache_imagesizes (
140 md5hash varchar(32) DEFAULT '' NOT NULL,
141 md5filename varchar(32) DEFAULT '' NOT NULL,
142 tstamp int(11) DEFAULT '0' NOT NULL,
143 filename varchar(255) DEFAULT '' NOT NULL,
144 imagewidth mediumint(11) unsigned DEFAULT '0' NOT NULL,
145 imageheight mediumint(11) unsigned DEFAULT '0' NOT NULL,
146 PRIMARY KEY (md5filename)
147 ) ENGINE=InnoDB;
148
149 #
150 # Table structure for table 'pages'
151 #
152 CREATE TABLE pages (
153 uid int(11) NOT NULL auto_increment,
154 pid int(11) DEFAULT '0' NOT NULL,
155 t3ver_oid int(11) DEFAULT '0' NOT NULL,
156 t3ver_id int(11) DEFAULT '0' NOT NULL,
157 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
158 t3ver_label varchar(255) DEFAULT '' NOT NULL,
159 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
160 t3ver_stage tinyint(4) DEFAULT '0' NOT NULL,
161 t3ver_count int(11) DEFAULT '0' NOT NULL,
162 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
163 t3ver_swapmode tinyint(4) DEFAULT '0' NOT NULL,
164 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
165 t3_origuid int(11) DEFAULT '0' NOT NULL,
166 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
167 sorting int(11) unsigned DEFAULT '0' NOT NULL,
168 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
169 perms_userid int(11) unsigned DEFAULT '0' NOT NULL,
170 perms_groupid int(11) unsigned DEFAULT '0' NOT NULL,
171 perms_user tinyint(4) unsigned DEFAULT '0' NOT NULL,
172 perms_group tinyint(4) unsigned DEFAULT '0' NOT NULL,
173 perms_everybody tinyint(4) unsigned DEFAULT '0' NOT NULL,
174 editlock tinyint(4) unsigned DEFAULT '0' NOT NULL,
175 crdate int(11) unsigned DEFAULT '0' NOT NULL,
176 cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
177 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
178 title varchar(255) DEFAULT '' NOT NULL,
179 doktype tinyint(3) unsigned DEFAULT '0' NOT NULL,
180 TSconfig text,
181 storage_pid int(11) DEFAULT '0' NOT NULL,
182 is_siteroot tinyint(4) DEFAULT '0' NOT NULL,
183 php_tree_stop tinyint(4) DEFAULT '0' NOT NULL,
184 tx_impexp_origuid int(11) DEFAULT '0' NOT NULL,
185 PRIMARY KEY (uid),
186 KEY t3ver_oid (t3ver_oid,t3ver_wsid),
187 KEY parent (pid,sorting,deleted,hidden)
188 );
189
190 #
191 # Table structure for table 'sys_registry'
192 #
193 CREATE TABLE sys_registry (
194 uid int(11) unsigned NOT NULL auto_increment,
195 entry_namespace varchar(128) DEFAULT '' NOT NULL,
196 entry_key varchar(255) DEFAULT '' NOT NULL,
197 entry_value blob,
198 PRIMARY KEY (uid),
199 UNIQUE KEY entry_identifier (entry_namespace,entry_key)
200 );
201
202 #
203 # Table structure for table 'sys_be_shortcuts'
204 #
205 CREATE TABLE sys_be_shortcuts (
206 uid int(11) unsigned NOT NULL auto_increment,
207 userid int(11) unsigned DEFAULT '0' NOT NULL,
208 module_name varchar(255) DEFAULT '' NOT NULL,
209 url text,
210 description varchar(255) DEFAULT '' NOT NULL,
211 sorting int(11) DEFAULT '0' NOT NULL,
212 sc_group tinyint(4) DEFAULT '0' NOT NULL,
213 PRIMARY KEY (uid),
214 KEY event (userid)
215 );
216
217
218 #
219 # Table structure for table 'sys_preview'
220 #
221 CREATE TABLE sys_preview (
222 keyword varchar(32) DEFAULT '' NOT NULL,
223 tstamp int(11) DEFAULT '0' NOT NULL,
224 endtime int(11) DEFAULT '0' NOT NULL,
225 config text,
226 PRIMARY KEY (keyword)
227 );
228
229
230 #
231 # Table structure for table 'sys_filemounts'
232 #
233 CREATE TABLE sys_filemounts (
234 uid int(11) unsigned NOT NULL auto_increment,
235 pid int(11) unsigned DEFAULT '0' NOT NULL,
236 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
237 title varchar(30) DEFAULT '' NOT NULL,
238 path varchar(120) DEFAULT '' NOT NULL,
239 base tinyint(4) unsigned DEFAULT '0' NOT NULL,
240 hidden tinyint(3) unsigned DEFAULT '0' NOT NULL,
241 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
242 PRIMARY KEY (uid),
243 KEY parent (pid)
244 );
245
246 #
247 # Table structure for table 'sys_workspace'
248 #
249 CREATE TABLE sys_workspace (
250 uid int(11) NOT NULL auto_increment,
251 pid int(11) DEFAULT '0' NOT NULL,
252 tstamp int(11) DEFAULT '0' NOT NULL,
253 deleted tinyint(1) DEFAULT '0' NOT NULL,
254 title varchar(30) DEFAULT '' NOT NULL,
255 description varchar(255) DEFAULT '' NOT NULL,
256 adminusers varchar(255) DEFAULT '' NOT NULL,
257 members text,
258 reviewers text,
259 db_mountpoints varchar(255) DEFAULT '' NOT NULL,
260 file_mountpoints varchar(255) DEFAULT '' NOT NULL,
261 publish_time int(11) DEFAULT '0' NOT NULL,
262 unpublish_time int(11) DEFAULT '0' NOT NULL,
263 freeze tinyint(3) DEFAULT '0' NOT NULL,
264 live_edit tinyint(3) DEFAULT '0' NOT NULL,
265 review_stage_edit tinyint(3) DEFAULT '0' NOT NULL,
266 vtypes tinyint(3) DEFAULT '0' NOT NULL,
267 disable_autocreate tinyint(1) DEFAULT '0' NOT NULL,
268 swap_modes tinyint(3) DEFAULT '0' NOT NULL,
269 publish_access tinyint(3) DEFAULT '0' NOT NULL,
270 stagechg_notification tinyint(3) DEFAULT '0' NOT NULL,
271
272 PRIMARY KEY (uid),
273 KEY parent (pid)
274 );
275
276 #
277 # Table structure for table 'sys_history'
278 #
279 CREATE TABLE sys_history (
280 uid int(11) unsigned NOT NULL auto_increment,
281 sys_log_uid int(11) DEFAULT '0' NOT NULL,
282 history_data mediumtext,
283 fieldlist text,
284 recuid int(11) DEFAULT '0' NOT NULL,
285 tablename varchar(255) DEFAULT '' NOT NULL,
286 tstamp int(11) DEFAULT '0' NOT NULL,
287 history_files mediumtext,
288 snapshot tinyint(4) DEFAULT '0' NOT NULL,
289 PRIMARY KEY (uid),
290 KEY recordident (tablename,recuid,tstamp),
291 KEY sys_log_uid (sys_log_uid)
292 );
293
294 #
295 # Table structure for table 'sys_lockedrecords'
296 #
297 CREATE TABLE sys_lockedrecords (
298 uid int(11) unsigned NOT NULL auto_increment,
299 userid int(11) unsigned DEFAULT '0' NOT NULL,
300 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
301 record_table varchar(255) DEFAULT '' NOT NULL,
302 record_uid int(11) DEFAULT '0' NOT NULL,
303 record_pid int(11) DEFAULT '0' NOT NULL,
304 username varchar(20) DEFAULT '' NOT NULL,
305 feuserid int(11) unsigned DEFAULT '0' NOT NULL,
306 PRIMARY KEY (uid),
307 KEY event (userid,tstamp)
308 );
309
310 #
311 # Table structure for table 'sys_refindex'
312 #
313 CREATE TABLE sys_refindex (
314 hash varchar(32) DEFAULT '' NOT NULL,
315 tablename varchar(255) DEFAULT '' NOT NULL,
316 recuid int(11) DEFAULT '0' NOT NULL,
317 field varchar(40) DEFAULT '' NOT NULL,
318 flexpointer varchar(255) DEFAULT '' NOT NULL,
319 softref_key varchar(30) DEFAULT '' NOT NULL,
320 softref_id varchar(40) DEFAULT '' NOT NULL,
321 sorting int(11) DEFAULT '0' NOT NULL,
322 deleted tinyint(1) DEFAULT '0' NOT NULL,
323 ref_table varchar(255) DEFAULT '' NOT NULL,
324 ref_uid int(11) DEFAULT '0' NOT NULL,
325 ref_string varchar(200) DEFAULT '' NOT NULL,
326
327 PRIMARY KEY (hash),
328 KEY lookup_rec (tablename,recuid),
329 KEY lookup_uid (ref_table,ref_uid),
330 KEY lookup_string (ref_table,ref_string)
331 );
332
333 #
334 # Table structure for table 'sys_refindex_words'
335 #
336 CREATE TABLE sys_refindex_words (
337 wid int(11) DEFAULT '0' NOT NULL,
338 baseword varchar(60) DEFAULT '' NOT NULL,
339 PRIMARY KEY (wid)
340 );
341
342 #
343 # Table structure for table 'sys_refindex_rel'
344 #
345 CREATE TABLE sys_refindex_rel (
346 rid int(11) DEFAULT '0' NOT NULL,
347 wid int(11) DEFAULT '0' NOT NULL,
348 PRIMARY KEY (rid,wid)
349 );
350
351
352 #
353 # Table structure for table 'sys_refindex_res'
354 #
355 CREATE TABLE sys_refindex_res (
356 rid int(11) DEFAULT '0' NOT NULL,
357 tablename varchar(255) DEFAULT '' NOT NULL,
358 recuid int(11) DEFAULT '0' NOT NULL,
359 PRIMARY KEY (rid)
360 );
361
362 #
363 # Table structure for table 'sys_log'
364 #
365 CREATE TABLE sys_log (
366 uid int(11) unsigned NOT NULL auto_increment,
367 userid int(11) unsigned DEFAULT '0' NOT NULL,
368 action tinyint(4) unsigned DEFAULT '0' NOT NULL,
369 recuid int(11) unsigned DEFAULT '0' NOT NULL,
370 tablename varchar(255) DEFAULT '' NOT NULL,
371 recpid int(11) DEFAULT '0' NOT NULL,
372 error tinyint(4) unsigned DEFAULT '0' NOT NULL,
373 details varchar(255) DEFAULT '' NOT NULL,
374 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
375 type tinyint(3) unsigned DEFAULT '0' NOT NULL,
376 details_nr tinyint(3) unsigned DEFAULT '0' NOT NULL,
377 IP varchar(39) DEFAULT '' NOT NULL,
378 log_data varchar(255) DEFAULT '' NOT NULL,
379 event_pid int(11) DEFAULT '-1' NOT NULL,
380 workspace int(11) DEFAULT '0' NOT NULL,
381 NEWid varchar(20) DEFAULT '' NOT NULL,
382 PRIMARY KEY (uid),
383 KEY event (userid,event_pid),
384 KEY recuidIdx (recuid,uid)
385 ) ENGINE=InnoDB;
386
387 #
388 # Table structure for table 'sys_language'
389 #
390 CREATE TABLE sys_language (
391 uid int(11) unsigned NOT NULL auto_increment,
392 pid int(11) unsigned DEFAULT '0' NOT NULL,
393 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
394 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
395 title varchar(80) DEFAULT '' NOT NULL,
396 flag varchar(20) DEFAULT '' NOT NULL,
397 static_lang_isocode int(11) unsigned DEFAULT '0' NOT NULL,
398 PRIMARY KEY (uid),
399 KEY parent (pid)
400 );