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