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