Follow-up to bug #8399: Table index was too long after changing the field size
[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 hidden tinyint(1) unsigned DEFAULT '0' NOT NULL,
26 inc_access_lists tinyint(3) unsigned DEFAULT '0' NOT NULL,
27 description text,
28 lockToDomain varchar(50) DEFAULT '' NOT NULL,
29 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
30 TSconfig text,
31 subgroup varchar(255) DEFAULT '' NOT NULL,
32 hide_in_lists tinyint(4) DEFAULT '0' NOT NULL,
33 workspace_perms tinyint(3) DEFAULT '1' NOT NULL,
34 PRIMARY KEY (uid),
35 KEY parent (pid)
36 );
37
38 #
39 # Table structure for table 'be_sessions'
40 #
41 CREATE TABLE be_sessions (
42 ses_id varchar(32) DEFAULT '' NOT NULL,
43 ses_name varchar(32) DEFAULT '' NOT NULL,
44 ses_iplock varchar(39) DEFAULT '' NOT NULL,
45 ses_hashlock int(11) DEFAULT '0' NOT NULL,
46 ses_userid int(11) unsigned DEFAULT '0' NOT NULL,
47 ses_tstamp int(11) unsigned DEFAULT '0' NOT NULL,
48 ses_data longtext,
49 ses_backuserid int(11) NOT NULL default '0',
50 PRIMARY KEY (ses_id,ses_name)
51 );
52
53 #
54 # Table structure for table 'be_users'
55 #
56 CREATE TABLE be_users (
57 uid int(11) unsigned NOT NULL auto_increment,
58 pid int(11) unsigned DEFAULT '0' NOT NULL,
59 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
60 username varchar(50) DEFAULT '' NOT NULL,
61 password varchar(40) 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 char(2) DEFAULT '' NOT NULL,
68 email varchar(80) DEFAULT '' NOT NULL,
69 db_mountpoints varchar(255) DEFAULT '' NOT NULL,
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 varchar(255) DEFAULT '' NOT NULL,
75 allowed_languages varchar(255) DEFAULT '' NOT NULL,
76 uc text,
77 file_mountpoints varchar(255) DEFAULT '' NOT NULL,
78 fileoper_perms tinyint(4) DEFAULT '0' NOT NULL,
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 varchar(255) DEFAULT '' NOT NULL,
87 workspace_id int(11) DEFAULT '0' NOT NULL,
88 workspace_preview tinyint(3) DEFAULT '1' NOT NULL,
89 PRIMARY KEY (uid),
90 KEY parent (pid),
91 KEY username (username)
92 );
93
94 #
95 # Table structure for table 'cache_extensions'
96 #
97 CREATE TABLE cache_extensions (
98 extkey varchar(60) NOT NULL default '',
99 version varchar(10) NOT NULL default '',
100 alldownloadcounter int(11) unsigned NOT NULL default '0',
101 downloadcounter int(11) unsigned NOT NULL default '0',
102 title varchar(150) NOT NULL default '',
103 description mediumtext,
104 state int(4) NOT NULL default '0',
105 reviewstate int(4) NOT NULL default '0',
106 category int(4) NOT NULL default '0',
107 lastuploaddate int(11) unsigned NOT NULL default '0',
108 dependencies mediumtext,
109 authorname varchar(100) NOT NULL default '',
110 authoremail varchar(100) NOT NULL default '',
111 ownerusername varchar(50) NOT NULL default '',
112 t3xfilemd5 varchar(35) NOT NULL default '',
113 uploadcomment mediumtext,
114 authorcompany varchar(100) NOT NULL default '',
115 intversion int(11) NOT NULL default '0',
116 lastversion int(3) NOT NULL default '0',
117 lastreviewedversion int(3) NOT NULL default '0',
118 PRIMARY KEY (extkey,version)
119 );
120
121 #
122 # Table structure for table 'cache_hash'
123 #
124 CREATE TABLE cache_hash (
125 id int(11) unsigned NOT NULL auto_increment,
126 identifier varchar(32) DEFAULT '' NOT NULL,
127 crdate int(11) unsigned DEFAULT '0' NOT NULL,
128 content mediumtext,
129 tags mediumtext,
130 lifetime int(11) unsigned DEFAULT '0' NOT NULL,
131 PRIMARY KEY (id),
132 KEY cache_id (identifier)
133 ) ENGINE=InnoDB;
134
135 #
136 # Table structure for table 'cache_imagesizes'
137 #
138 CREATE TABLE cache_imagesizes (
139 md5hash varchar(32) DEFAULT '' NOT NULL,
140 md5filename varchar(32) DEFAULT '' NOT NULL,
141 tstamp int(11) DEFAULT '0' NOT NULL,
142 filename varchar(255) DEFAULT '' NOT NULL,
143 imagewidth mediumint(11) unsigned DEFAULT '0' NOT NULL,
144 imageheight mediumint(11) unsigned DEFAULT '0' NOT NULL,
145 PRIMARY KEY (md5filename)
146 ) ENGINE=InnoDB;
147
148 #
149 # Table structure for table 'pages'
150 #
151 CREATE TABLE pages (
152 uid int(11) NOT NULL auto_increment,
153 pid int(11) DEFAULT '0' NOT NULL,
154 t3ver_oid int(11) DEFAULT '0' NOT NULL,
155 t3ver_id int(11) DEFAULT '0' NOT NULL,
156 t3ver_wsid int(11) DEFAULT '0' NOT NULL,
157 t3ver_label varchar(30) DEFAULT '' NOT NULL,
158 t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
159 t3ver_stage tinyint(4) DEFAULT '0' NOT NULL,
160 t3ver_count int(11) DEFAULT '0' NOT NULL,
161 t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
162 t3ver_swapmode tinyint(4) DEFAULT '0' NOT NULL,
163 t3ver_move_id int(11) DEFAULT '0' NOT NULL,
164 t3_origuid int(11) DEFAULT '0' NOT NULL,
165 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
166 sorting int(11) unsigned DEFAULT '0' NOT NULL,
167 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
168 perms_userid int(11) unsigned DEFAULT '0' NOT NULL,
169 perms_groupid int(11) unsigned DEFAULT '0' NOT NULL,
170 perms_user tinyint(4) unsigned DEFAULT '0' NOT NULL,
171 perms_group tinyint(4) unsigned DEFAULT '0' NOT NULL,
172 perms_everybody tinyint(4) unsigned DEFAULT '0' NOT NULL,
173 editlock tinyint(4) unsigned DEFAULT '0' NOT NULL,
174 crdate int(11) unsigned DEFAULT '0' NOT NULL,
175 cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
176 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
177 title varchar(255) DEFAULT '' NOT NULL,
178 doktype tinyint(3) unsigned DEFAULT '0' NOT NULL,
179 TSconfig text,
180 storage_pid int(11) DEFAULT '0' NOT NULL,
181 is_siteroot tinyint(4) DEFAULT '0' NOT NULL,
182 php_tree_stop tinyint(4) DEFAULT '0' NOT NULL,
183 tx_impexp_origuid int(11) DEFAULT '0' NOT NULL,
184 PRIMARY KEY (uid),
185 KEY t3ver_oid (t3ver_oid,t3ver_wsid),
186 KEY parent (pid,sorting,deleted,hidden)
187 );
188
189 #
190 # Table structure for table 'sys_be_shortcuts'
191 #
192 CREATE TABLE sys_be_shortcuts (
193 uid int(11) unsigned NOT NULL auto_increment,
194 userid int(11) unsigned DEFAULT '0' NOT NULL,
195 module_name varchar(255) DEFAULT '' NOT NULL,
196 url text,
197 description varchar(255) DEFAULT '' NOT NULL,
198 sorting int(11) DEFAULT '0' NOT NULL,
199 sc_group tinyint(4) DEFAULT '0' NOT NULL,
200 PRIMARY KEY (uid),
201 KEY event (userid)
202 );
203
204
205 #
206 # Table structure for table 'sys_preview'
207 #
208 CREATE TABLE sys_preview (
209 keyword varchar(32) DEFAULT '' NOT NULL,
210 tstamp int(11) DEFAULT '0' NOT NULL,
211 endtime int(11) DEFAULT '0' NOT NULL,
212 config text,
213 PRIMARY KEY (keyword)
214 );
215
216
217 #
218 # Table structure for table 'sys_filemounts'
219 #
220 CREATE TABLE sys_filemounts (
221 uid int(11) unsigned NOT NULL auto_increment,
222 pid int(11) unsigned DEFAULT '0' NOT NULL,
223 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
224 title varchar(30) DEFAULT '' NOT NULL,
225 path varchar(120) DEFAULT '' NOT NULL,
226 base tinyint(4) unsigned DEFAULT '0' NOT NULL,
227 hidden tinyint(3) unsigned DEFAULT '0' NOT NULL,
228 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
229 PRIMARY KEY (uid),
230 KEY parent (pid)
231 );
232
233 #
234 # Table structure for table 'sys_workspace'
235 #
236 CREATE TABLE sys_workspace (
237 uid int(11) NOT NULL auto_increment,
238 pid int(11) DEFAULT '0' NOT NULL,
239 tstamp int(11) DEFAULT '0' NOT NULL,
240 deleted tinyint(1) DEFAULT '0' NOT NULL,
241 title varchar(30) DEFAULT '' NOT NULL,
242 description varchar(255) DEFAULT '' NOT NULL,
243 adminusers varchar(255) DEFAULT '' NOT NULL,
244 members text,
245 reviewers text,
246 db_mountpoints varchar(255) DEFAULT '' NOT NULL,
247 file_mountpoints varchar(255) DEFAULT '' NOT NULL,
248 publish_time int(11) DEFAULT '0' NOT NULL,
249 unpublish_time int(11) DEFAULT '0' NOT NULL,
250 freeze tinyint(3) DEFAULT '0' NOT NULL,
251 live_edit tinyint(3) DEFAULT '0' NOT NULL,
252 review_stage_edit tinyint(3) DEFAULT '0' NOT NULL,
253 vtypes tinyint(3) DEFAULT '0' NOT NULL,
254 disable_autocreate tinyint(1) DEFAULT '0' NOT NULL,
255 swap_modes tinyint(3) DEFAULT '0' NOT NULL,
256 publish_access tinyint(3) DEFAULT '0' NOT NULL,
257 stagechg_notification tinyint(3) DEFAULT '0' NOT NULL,
258
259 PRIMARY KEY (uid),
260 KEY parent (pid)
261 );
262
263 #
264 # Table structure for table 'sys_history'
265 #
266 CREATE TABLE sys_history (
267 uid int(11) unsigned NOT NULL auto_increment,
268 sys_log_uid int(11) DEFAULT '0' NOT NULL,
269 history_data mediumtext,
270 fieldlist text,
271 recuid int(11) DEFAULT '0' NOT NULL,
272 tablename varchar(255) DEFAULT '' NOT NULL,
273 tstamp int(11) DEFAULT '0' NOT NULL,
274 history_files mediumtext,
275 snapshot tinyint(4) DEFAULT '0' NOT NULL,
276 PRIMARY KEY (uid),
277 KEY recordident (tablename,recuid,tstamp),
278 KEY sys_log_uid (sys_log_uid)
279 );
280
281 #
282 # Table structure for table 'sys_lockedrecords'
283 #
284 CREATE TABLE sys_lockedrecords (
285 uid int(11) unsigned NOT NULL auto_increment,
286 userid int(11) unsigned DEFAULT '0' NOT NULL,
287 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
288 record_table varchar(255) DEFAULT '' NOT NULL,
289 record_uid int(11) DEFAULT '0' NOT NULL,
290 record_pid int(11) DEFAULT '0' NOT NULL,
291 username varchar(20) DEFAULT '' NOT NULL,
292 feuserid int(11) unsigned DEFAULT '0' NOT NULL,
293 PRIMARY KEY (uid),
294 KEY event (userid,tstamp)
295 );
296
297 #
298 # Table structure for table 'sys_refindex'
299 #
300 CREATE TABLE sys_refindex (
301 hash varchar(32) DEFAULT '' NOT NULL,
302 tablename varchar(255) DEFAULT '' NOT NULL,
303 recuid int(11) DEFAULT '0' NOT NULL,
304 field varchar(40) DEFAULT '' NOT NULL,
305 flexpointer varchar(255) DEFAULT '' NOT NULL,
306 softref_key varchar(30) DEFAULT '' NOT NULL,
307 softref_id varchar(40) DEFAULT '' NOT NULL,
308 sorting int(11) DEFAULT '0' NOT NULL,
309 deleted tinyint(1) DEFAULT '0' NOT NULL,
310 ref_table varchar(255) DEFAULT '' NOT NULL,
311 ref_uid int(11) DEFAULT '0' NOT NULL,
312 ref_string varchar(200) DEFAULT '' NOT NULL,
313
314 PRIMARY KEY (hash),
315 KEY lookup_rec (tablename,recuid),
316 KEY lookup_uid (ref_table,ref_uid),
317 KEY lookup_string (ref_table(133),ref_string)
318 );
319
320 #
321 # Table structure for table ''
322 #
323 CREATE TABLE sys_refindex_words (
324 wid int(11) DEFAULT '0' NOT NULL,
325 baseword varchar(60) DEFAULT '' NOT NULL,
326 PRIMARY KEY (wid)
327 );
328
329 #
330 # Table structure for table ''
331 #
332 CREATE TABLE sys_refindex_rel (
333 rid int(11) DEFAULT '0' NOT NULL,
334 wid int(11) DEFAULT '0' NOT NULL,
335 PRIMARY KEY (rid,wid)
336 );
337
338
339 #
340 # Table structure for table ''
341 #
342 CREATE TABLE sys_refindex_res (
343 rid int(11) DEFAULT '0' NOT NULL,
344 tablename varchar(255) DEFAULT '' NOT NULL,
345 recuid int(11) DEFAULT '0' NOT NULL,
346 PRIMARY KEY (rid)
347 );
348
349 #
350 # Table structure for table 'sys_log'
351 #
352 CREATE TABLE sys_log (
353 uid int(11) unsigned NOT NULL auto_increment,
354 userid int(11) unsigned DEFAULT '0' NOT NULL,
355 action tinyint(4) unsigned DEFAULT '0' NOT NULL,
356 recuid int(11) unsigned DEFAULT '0' NOT NULL,
357 tablename varchar(255) DEFAULT '' NOT NULL,
358 recpid int(11) DEFAULT '0' NOT NULL,
359 error tinyint(4) unsigned DEFAULT '0' NOT NULL,
360 details varchar(255) DEFAULT '' NOT NULL,
361 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
362 type tinyint(3) unsigned DEFAULT '0' NOT NULL,
363 details_nr tinyint(3) unsigned DEFAULT '0' NOT NULL,
364 IP varchar(39) DEFAULT '' NOT NULL,
365 log_data varchar(255) DEFAULT '' NOT NULL,
366 event_pid int(11) DEFAULT '-1' NOT NULL,
367 workspace int(11) DEFAULT '0' NOT NULL,
368 NEWid varchar(20) DEFAULT '' NOT NULL,
369 PRIMARY KEY (uid),
370 KEY event (userid,event_pid),
371 KEY recuidIdx (recuid,uid)
372 ) ENGINE=InnoDB;
373
374 #
375 # Table structure for table 'sys_language'
376 #
377 CREATE TABLE sys_language (
378 uid int(11) unsigned NOT NULL auto_increment,
379 pid int(11) unsigned DEFAULT '0' NOT NULL,
380 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
381 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
382 title varchar(80) DEFAULT '' NOT NULL,
383 flag varchar(20) DEFAULT '' NOT NULL,
384 static_lang_isocode int(11) unsigned DEFAULT '0' NOT NULL,
385 PRIMARY KEY (uid),
386 KEY parent (pid)
387 );