!!! fixed bug #11593: Field t3ver_label is to small for uids >= 100000 (thanks to...
[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_be_shortcuts'
192 #
193 CREATE TABLE sys_be_shortcuts (
194 uid int(11) unsigned NOT NULL auto_increment,
195 userid int(11) unsigned DEFAULT '0' NOT NULL,
196 module_name varchar(255) DEFAULT '' NOT NULL,
197 url text,
198 description varchar(255) DEFAULT '' NOT NULL,
199 sorting int(11) DEFAULT '0' NOT NULL,
200 sc_group tinyint(4) DEFAULT '0' NOT NULL,
201 PRIMARY KEY (uid),
202 KEY event (userid)
203 );
204
205
206 #
207 # Table structure for table 'sys_preview'
208 #
209 CREATE TABLE sys_preview (
210 keyword varchar(32) DEFAULT '' NOT NULL,
211 tstamp int(11) DEFAULT '0' NOT NULL,
212 endtime int(11) DEFAULT '0' NOT NULL,
213 config text,
214 PRIMARY KEY (keyword)
215 );
216
217
218 #
219 # Table structure for table 'sys_filemounts'
220 #
221 CREATE TABLE sys_filemounts (
222 uid int(11) unsigned NOT NULL auto_increment,
223 pid int(11) unsigned DEFAULT '0' NOT NULL,
224 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
225 title varchar(30) DEFAULT '' NOT NULL,
226 path varchar(120) DEFAULT '' NOT NULL,
227 base tinyint(4) unsigned DEFAULT '0' NOT NULL,
228 hidden tinyint(3) unsigned DEFAULT '0' NOT NULL,
229 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
230 PRIMARY KEY (uid),
231 KEY parent (pid)
232 );
233
234 #
235 # Table structure for table 'sys_workspace'
236 #
237 CREATE TABLE sys_workspace (
238 uid int(11) NOT NULL auto_increment,
239 pid int(11) DEFAULT '0' NOT NULL,
240 tstamp int(11) DEFAULT '0' NOT NULL,
241 deleted tinyint(1) DEFAULT '0' NOT NULL,
242 title varchar(30) DEFAULT '' NOT NULL,
243 description varchar(255) DEFAULT '' NOT NULL,
244 adminusers varchar(255) DEFAULT '' NOT NULL,
245 members text,
246 reviewers text,
247 db_mountpoints varchar(255) DEFAULT '' NOT NULL,
248 file_mountpoints varchar(255) DEFAULT '' NOT NULL,
249 publish_time int(11) DEFAULT '0' NOT NULL,
250 unpublish_time int(11) DEFAULT '0' NOT NULL,
251 freeze tinyint(3) DEFAULT '0' NOT NULL,
252 live_edit tinyint(3) DEFAULT '0' NOT NULL,
253 review_stage_edit tinyint(3) DEFAULT '0' NOT NULL,
254 vtypes tinyint(3) DEFAULT '0' NOT NULL,
255 disable_autocreate tinyint(1) DEFAULT '0' NOT NULL,
256 swap_modes tinyint(3) DEFAULT '0' NOT NULL,
257 publish_access tinyint(3) DEFAULT '0' NOT NULL,
258 stagechg_notification tinyint(3) DEFAULT '0' NOT NULL,
259
260 PRIMARY KEY (uid),
261 KEY parent (pid)
262 );
263
264 #
265 # Table structure for table 'sys_history'
266 #
267 CREATE TABLE sys_history (
268 uid int(11) unsigned NOT NULL auto_increment,
269 sys_log_uid int(11) DEFAULT '0' NOT NULL,
270 history_data mediumtext,
271 fieldlist text,
272 recuid int(11) DEFAULT '0' NOT NULL,
273 tablename varchar(255) DEFAULT '' NOT NULL,
274 tstamp int(11) DEFAULT '0' NOT NULL,
275 history_files mediumtext,
276 snapshot tinyint(4) DEFAULT '0' NOT NULL,
277 PRIMARY KEY (uid),
278 KEY recordident (tablename,recuid,tstamp),
279 KEY sys_log_uid (sys_log_uid)
280 );
281
282 #
283 # Table structure for table 'sys_lockedrecords'
284 #
285 CREATE TABLE sys_lockedrecords (
286 uid int(11) unsigned NOT NULL auto_increment,
287 userid int(11) unsigned DEFAULT '0' NOT NULL,
288 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
289 record_table varchar(255) DEFAULT '' NOT NULL,
290 record_uid int(11) DEFAULT '0' NOT NULL,
291 record_pid int(11) DEFAULT '0' NOT NULL,
292 username varchar(20) DEFAULT '' NOT NULL,
293 feuserid int(11) unsigned DEFAULT '0' NOT NULL,
294 PRIMARY KEY (uid),
295 KEY event (userid,tstamp)
296 );
297
298 #
299 # Table structure for table 'sys_refindex'
300 #
301 CREATE TABLE sys_refindex (
302 hash varchar(32) DEFAULT '' NOT NULL,
303 tablename varchar(255) DEFAULT '' NOT NULL,
304 recuid int(11) DEFAULT '0' NOT NULL,
305 field varchar(40) DEFAULT '' NOT NULL,
306 flexpointer varchar(255) DEFAULT '' NOT NULL,
307 softref_key varchar(30) DEFAULT '' NOT NULL,
308 softref_id varchar(40) DEFAULT '' NOT NULL,
309 sorting int(11) DEFAULT '0' NOT NULL,
310 deleted tinyint(1) DEFAULT '0' NOT NULL,
311 ref_table varchar(255) DEFAULT '' NOT NULL,
312 ref_uid int(11) DEFAULT '0' NOT NULL,
313 ref_string varchar(200) DEFAULT '' NOT NULL,
314
315 PRIMARY KEY (hash),
316 KEY lookup_rec (tablename,recuid),
317 KEY lookup_uid (ref_table,ref_uid),
318 KEY lookup_string (ref_table,ref_string)
319 );
320
321 #
322 # Table structure for table ''
323 #
324 CREATE TABLE sys_refindex_words (
325 wid int(11) DEFAULT '0' NOT NULL,
326 baseword varchar(60) DEFAULT '' NOT NULL,
327 PRIMARY KEY (wid)
328 );
329
330 #
331 # Table structure for table ''
332 #
333 CREATE TABLE sys_refindex_rel (
334 rid int(11) DEFAULT '0' NOT NULL,
335 wid int(11) DEFAULT '0' NOT NULL,
336 PRIMARY KEY (rid,wid)
337 );
338
339
340 #
341 # Table structure for table ''
342 #
343 CREATE TABLE sys_refindex_res (
344 rid int(11) DEFAULT '0' NOT NULL,
345 tablename varchar(255) DEFAULT '' NOT NULL,
346 recuid int(11) DEFAULT '0' NOT NULL,
347 PRIMARY KEY (rid)
348 );
349
350 #
351 # Table structure for table 'sys_log'
352 #
353 CREATE TABLE sys_log (
354 uid int(11) unsigned NOT NULL auto_increment,
355 userid int(11) unsigned DEFAULT '0' NOT NULL,
356 action tinyint(4) unsigned DEFAULT '0' NOT NULL,
357 recuid int(11) unsigned DEFAULT '0' NOT NULL,
358 tablename varchar(255) DEFAULT '' NOT NULL,
359 recpid int(11) DEFAULT '0' NOT NULL,
360 error tinyint(4) unsigned DEFAULT '0' NOT NULL,
361 details varchar(255) DEFAULT '' NOT NULL,
362 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
363 type tinyint(3) unsigned DEFAULT '0' NOT NULL,
364 details_nr tinyint(3) unsigned DEFAULT '0' NOT NULL,
365 IP varchar(39) DEFAULT '' NOT NULL,
366 log_data varchar(255) DEFAULT '' NOT NULL,
367 event_pid int(11) DEFAULT '-1' NOT NULL,
368 workspace int(11) DEFAULT '0' NOT NULL,
369 NEWid varchar(20) DEFAULT '' NOT NULL,
370 PRIMARY KEY (uid),
371 KEY event (userid,event_pid),
372 KEY recuidIdx (recuid,uid)
373 ) ENGINE=InnoDB;
374
375 #
376 # Table structure for table 'sys_language'
377 #
378 CREATE TABLE sys_language (
379 uid int(11) unsigned NOT NULL auto_increment,
380 pid int(11) unsigned DEFAULT '0' NOT NULL,
381 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
382 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
383 title varchar(80) DEFAULT '' NOT NULL,
384 flag varchar(20) DEFAULT '' NOT NULL,
385 static_lang_isocode int(11) unsigned DEFAULT '0' NOT NULL,
386 PRIMARY KEY (uid),
387 KEY parent (pid)
388 );