Fixed bug #5088: Cache is not saved properly because of charset conflict in the datab...
[Packages/TYPO3.CMS.git] / t3lib / stddb / tables.sql
1 #
2 # TYPO3 CVS 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 NOT NULL,
14 explicit_allowdeny text NOT NULL,
15 allowed_languages varchar(255) DEFAULT '' NOT NULL,
16 custom_options text NOT NULL,
17 db_mountpoints varchar(255) DEFAULT '' NOT NULL,
18 pagetypes_select varchar(255) DEFAULT '' NOT NULL,
19 tables_select text NOT NULL,
20 tables_modify text NOT NULL,
21 crdate int(11) unsigned DEFAULT '0' NOT NULL,
22 cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
23 groupMods text NOT NULL,
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 NOT NULL,
28 lockToDomain varchar(50) DEFAULT '' NOT NULL,
29 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
30 TSconfig text NOT NULL,
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 NOT NULL,
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 NOT NULL,
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 NOT NULL,
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 NOT NULL,
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 NOT NULL,
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 NOT NULL,
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 NOT NULL,
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 t3_origuid int(11) DEFAULT '0' NOT NULL,
161 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
162 sorting int(11) unsigned DEFAULT '0' NOT NULL,
163 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
164 perms_userid int(11) unsigned DEFAULT '0' NOT NULL,
165 perms_groupid int(11) unsigned DEFAULT '0' NOT NULL,
166 perms_user tinyint(4) unsigned DEFAULT '0' NOT NULL,
167 perms_group tinyint(4) unsigned DEFAULT '0' NOT NULL,
168 perms_everybody tinyint(4) unsigned DEFAULT '0' NOT NULL,
169 editlock tinyint(4) unsigned DEFAULT '0' NOT NULL,
170 crdate int(11) unsigned DEFAULT '0' NOT NULL,
171 cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
172 title varchar(255) DEFAULT '' NOT NULL,
173 doktype tinyint(3) unsigned DEFAULT '0' NOT NULL,
174 TSconfig text NOT NULL,
175 storage_pid int(11) DEFAULT '0' NOT NULL,
176 is_siteroot tinyint(4) DEFAULT '0' NOT NULL,
177 php_tree_stop tinyint(4) DEFAULT '0' NOT NULL,
178 tx_impexp_origuid int(11) DEFAULT '0' NOT NULL,
179 PRIMARY KEY (uid),
180 KEY t3ver_oid (t3ver_oid,t3ver_wsid),
181 KEY parent (pid,sorting)
182 );
183
184 #
185 # Table structure for table 'sys_be_shortcuts'
186 #
187 CREATE TABLE sys_be_shortcuts (
188 uid int(11) unsigned NOT NULL auto_increment,
189 userid int(11) unsigned DEFAULT '0' NOT NULL,
190 module_name varchar(255) DEFAULT '' NOT NULL,
191 url text NOT NULL,
192 description varchar(255) DEFAULT '' NOT NULL,
193 sorting int(11) DEFAULT '0' NOT NULL,
194 sc_group tinyint(4) DEFAULT '0' NOT NULL,
195 PRIMARY KEY (uid),
196 KEY event (userid)
197 );
198
199
200 #
201 # Table structure for table 'sys_preview'
202 #
203 CREATE TABLE sys_preview (
204 keyword varchar(32) DEFAULT '' NOT NULL,
205 tstamp int(11) DEFAULT '0' NOT NULL,
206 endtime int(11) DEFAULT '0' NOT NULL,
207 config text NOT NULL,
208 PRIMARY KEY (keyword)
209 );
210
211
212 #
213 # Table structure for table 'sys_filemounts'
214 #
215 CREATE TABLE sys_filemounts (
216 uid int(11) unsigned NOT NULL auto_increment,
217 pid int(11) unsigned DEFAULT '0' NOT NULL,
218 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
219 title varchar(30) DEFAULT '' NOT NULL,
220 path varchar(120) DEFAULT '' NOT NULL,
221 base tinyint(4) unsigned DEFAULT '0' NOT NULL,
222 hidden tinyint(3) unsigned DEFAULT '0' NOT NULL,
223 deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
224 PRIMARY KEY (uid),
225 KEY parent (pid)
226 );
227
228 #
229 # Table structure for table 'sys_workspace'
230 #
231 CREATE TABLE sys_workspace (
232 uid int(11) NOT NULL auto_increment,
233 pid int(11) DEFAULT '0' NOT NULL,
234 tstamp int(11) DEFAULT '0' NOT NULL,
235 deleted tinyint(1) DEFAULT '0' NOT NULL,
236 title varchar(30) DEFAULT '' NOT NULL,
237 description varchar(255) DEFAULT '' NOT NULL,
238 adminusers varchar(255) DEFAULT '' NOT NULL,
239 members text NOT NULL,
240 reviewers text NOT NULL,
241 db_mountpoints varchar(255) DEFAULT '' NOT NULL,
242 file_mountpoints varchar(255) DEFAULT '' NOT NULL,
243 publish_time int(11) DEFAULT '0' NOT NULL,
244 unpublish_time int(11) DEFAULT '0' NOT NULL,
245 freeze tinyint(3) DEFAULT '0' NOT NULL,
246 live_edit tinyint(3) DEFAULT '0' NOT NULL,
247 review_stage_edit tinyint(3) DEFAULT '0' NOT NULL,
248 vtypes tinyint(3) DEFAULT '0' NOT NULL,
249 disable_autocreate tinyint(1) DEFAULT '0' NOT NULL,
250 swap_modes tinyint(3) DEFAULT '0' NOT NULL,
251 publish_access tinyint(3) DEFAULT '0' NOT NULL,
252 stagechg_notification tinyint(3) DEFAULT '0' NOT NULL,
253
254 PRIMARY KEY (uid),
255 KEY parent (pid)
256 );
257
258 #
259 # Table structure for table 'sys_history'
260 #
261 CREATE TABLE sys_history (
262 uid int(11) unsigned NOT NULL auto_increment,
263 sys_log_uid int(11) DEFAULT '0' NOT NULL,
264 history_data mediumtext NOT NULL,
265 fieldlist text NOT NULL,
266 recuid int(11) DEFAULT '0' NOT NULL,
267 tablename varchar(40) DEFAULT '' NOT NULL,
268 tstamp int(11) DEFAULT '0' NOT NULL,
269 history_files mediumtext NOT NULL,
270 snapshot tinyint(4) DEFAULT '0' NOT NULL,
271 PRIMARY KEY (uid),
272 KEY recordident (tablename,recuid,tstamp),
273 KEY sys_log_uid (sys_log_uid)
274 );
275
276 #
277 # Table structure for table 'sys_lockedrecords'
278 #
279 CREATE TABLE sys_lockedrecords (
280 uid int(11) unsigned NOT NULL auto_increment,
281 userid int(11) unsigned DEFAULT '0' NOT NULL,
282 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
283 record_table varchar(40) DEFAULT '' NOT NULL,
284 record_uid int(11) DEFAULT '0' NOT NULL,
285 record_pid int(11) DEFAULT '0' NOT NULL,
286 username varchar(20) DEFAULT '' NOT NULL,
287 PRIMARY KEY (uid),
288 KEY event (userid,tstamp)
289 );
290
291 #
292 # Table structure for table 'sys_refindex'
293 #
294 CREATE TABLE sys_refindex (
295 hash varchar(32) DEFAULT '' NOT NULL,
296 tablename varchar(40) DEFAULT '' NOT NULL,
297 recuid int(11) DEFAULT '0' NOT NULL,
298 field varchar(40) DEFAULT '' NOT NULL,
299 flexpointer varchar(255) DEFAULT '' NOT NULL,
300 softref_key varchar(30) DEFAULT '' NOT NULL,
301 softref_id varchar(40) DEFAULT '' NOT NULL,
302 sorting int(11) DEFAULT '0' NOT NULL,
303 deleted tinyint(1) DEFAULT '0' NOT NULL,
304 ref_table varchar(40) DEFAULT '' NOT NULL,
305 ref_uid int(11) DEFAULT '0' NOT NULL,
306 ref_string varchar(200) DEFAULT '' NOT NULL,
307
308 PRIMARY KEY (hash),
309 KEY lookup_rec (tablename,recuid),
310 KEY lookup_uid (ref_table,ref_uid),
311 KEY lookup_string (ref_table,ref_string)
312 );
313
314 #
315 # Table structure for table ''
316 #
317 CREATE TABLE sys_refindex_words (
318 wid int(11) DEFAULT '0' NOT NULL,
319 baseword varchar(60) DEFAULT '' NOT NULL,
320 PRIMARY KEY (wid)
321 );
322
323 #
324 # Table structure for table ''
325 #
326 CREATE TABLE sys_refindex_rel (
327 rid int(11) DEFAULT '0' NOT NULL,
328 wid int(11) DEFAULT '0' NOT NULL,
329 PRIMARY KEY (rid,wid)
330 );
331
332
333 #
334 # Table structure for table ''
335 #
336 CREATE TABLE sys_refindex_res (
337 rid int(11) DEFAULT '0' NOT NULL,
338 tablename varchar(100) DEFAULT '' NOT NULL,
339 recuid int(11) DEFAULT '0' NOT NULL,
340 PRIMARY KEY (rid)
341 );
342
343 #
344 # Table structure for table 'sys_log'
345 #
346 CREATE TABLE sys_log (
347 uid int(11) unsigned NOT NULL auto_increment,
348 userid int(11) unsigned DEFAULT '0' NOT NULL,
349 action tinyint(4) unsigned DEFAULT '0' NOT NULL,
350 recuid int(11) unsigned DEFAULT '0' NOT NULL,
351 tablename varchar(40) DEFAULT '' NOT NULL,
352 recpid int(11) DEFAULT '0' NOT NULL,
353 error tinyint(4) unsigned DEFAULT '0' NOT NULL,
354 details varchar(255) DEFAULT '' NOT NULL,
355 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
356 type tinyint(3) unsigned DEFAULT '0' NOT NULL,
357 details_nr tinyint(3) unsigned DEFAULT '0' NOT NULL,
358 IP varchar(39) DEFAULT '' NOT NULL,
359 log_data varchar(255) DEFAULT '' NOT NULL,
360 event_pid int(11) DEFAULT '-1' NOT NULL,
361 workspace int(11) DEFAULT '0' NOT NULL,
362 NEWid varchar(20) DEFAULT '' NOT NULL,
363 PRIMARY KEY (uid),
364 KEY event (userid,event_pid),
365 KEY recuidIdx (recuid,uid)
366 ) ENGINE=InnoDB;
367
368 #
369 # Table structure for table 'sys_language'
370 #
371 CREATE TABLE sys_language (
372 uid int(11) unsigned NOT NULL auto_increment,
373 pid int(11) unsigned DEFAULT '0' NOT NULL,
374 tstamp int(11) unsigned DEFAULT '0' NOT NULL,
375 hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
376 title varchar(80) DEFAULT '' NOT NULL,
377 flag varchar(20) DEFAULT '' NOT NULL,
378 static_lang_isocode int(11) unsigned DEFAULT '0' NOT NULL,
379 PRIMARY KEY (uid),
380 KEY parent (pid)
381 );
382