Index: trunk/phase3/maintenance/mssql/tables.sql |
— | — | @@ -0,0 +1,395 @@ |
| 2 | +CREATE TABLE /*$wgDBprefix*/user ( |
| 3 | + user_id int NOT NULL IDENTITY(1,1), |
| 4 | + user_name varchar(255) NOT NULL default '', |
| 5 | + user_real_name varchar(255) NOT NULL default '', |
| 6 | + user_password text NOT NULL, |
| 7 | + user_newpassword text NOT NULL, |
| 8 | + user_newpass_time binary(14), |
| 9 | + user_email text NOT NULL, |
| 10 | + user_options text NOT NULL, |
| 11 | + user_touched binary(14) NOT NULL default 0, |
| 12 | + user_token binary(32) NOT NULL default 0, |
| 13 | + user_email_authenticated binary(14), |
| 14 | + user_email_token binary(32), |
| 15 | + user_email_token_expires binary(14), |
| 16 | + user_registration binary(14), |
| 17 | + user_editcount int, |
| 18 | + PRIMARY KEY (user_id) |
| 19 | +); |
| 20 | + |
| 21 | +CREATE TABLE /*$wgDBprefix*/user_groups ( |
| 22 | + ug_user int NOT NULL default '0', |
| 23 | + ug_group varbinary(16) NOT NULL default 0, |
| 24 | + PRIMARY KEY (ug_user,ug_group) |
| 25 | +); |
| 26 | + |
| 27 | +CREATE TABLE /*$wgDBprefix*/user_newtalk ( |
| 28 | + user_id int NOT NULL default '0', |
| 29 | + user_ip varbinary(40) NOT NULL default 0, |
| 30 | + user_last_timestamp binary(14) NOT NULL default 0 |
| 31 | +); |
| 32 | + |
| 33 | +CREATE TABLE /*$wgDBprefix*/page ( |
| 34 | + page_id int NOT NULL IDENTITY(1,1), |
| 35 | + page_namespace int NOT NULL, |
| 36 | + page_title varchar(255) NOT NULL, |
| 37 | + page_restrictions text NOT NULL, |
| 38 | + page_counter bigint NOT NULL default '0', |
| 39 | + page_is_redirect tinyint NOT NULL default '0', |
| 40 | + page_is_new tinyint NOT NULL default '0', |
| 41 | + page_random real NOT NULL, |
| 42 | + page_touched binary(14) NOT NULL default 0, |
| 43 | + page_latest int NOT NULL, |
| 44 | + page_len int NOT NULL, |
| 45 | + PRIMARY KEY (page_id) |
| 46 | +); |
| 47 | + |
| 48 | +CREATE TABLE /*$wgDBprefix*/revision ( |
| 49 | + rev_id int NOT NULL IDENTITY(1,1), |
| 50 | + rev_page int NOT NULL, |
| 51 | + rev_text_id int NOT NULL, |
| 52 | + rev_comment text NOT NULL, |
| 53 | + rev_user int NOT NULL default '0', |
| 54 | + rev_user_text varchar(255) NOT NULL default '', |
| 55 | + rev_timestamp binary(14) NOT NULL default 0, |
| 56 | + rev_minor_edit tinyint NOT NULL default '0', |
| 57 | + rev_deleted tinyint NOT NULL default '0', |
| 58 | + rev_len int, |
| 59 | + rev_parent_id int default NULL, |
| 60 | + PRIMARY KEY (rev_page, rev_id) |
| 61 | +); |
| 62 | + |
| 63 | +CREATE TABLE /*$wgDBprefix*/text ( |
| 64 | + old_id int NOT NULL IDENTITY(1,1), |
| 65 | + old_text text NOT NULL, |
| 66 | + old_flags text NOT NULL, |
| 67 | + PRIMARY KEY (old_id) |
| 68 | +); |
| 69 | + |
| 70 | +CREATE TABLE /*$wgDBprefix*/archive ( |
| 71 | + ar_namespace int NOT NULL default '0', |
| 72 | + ar_title varchar(255) NOT NULL default '', |
| 73 | + ar_text text NOT NULL, |
| 74 | + ar_comment text NOT NULL, |
| 75 | + ar_user int NOT NULL default '0', |
| 76 | + ar_user_text varchar(255) NOT NULL, |
| 77 | + ar_timestamp binary(14) NOT NULL default 0, |
| 78 | + ar_minor_edit tinyint NOT NULL default '0', |
| 79 | + ar_flags text NOT NULL, |
| 80 | + ar_rev_id int, |
| 81 | + ar_text_id int, |
| 82 | + ar_deleted tinyint NOT NULL default '0', |
| 83 | + ar_len int, |
| 84 | + ar_page_id int, |
| 85 | + ar_parent_id int default NULL |
| 86 | +); |
| 87 | + |
| 88 | +CREATE TABLE /*$wgDBprefix*/pagelinks ( |
| 89 | + pl_from int NOT NULL default '0', |
| 90 | + pl_namespace int NOT NULL default '0', |
| 91 | + pl_title varchar(255) NOT NULL default '' |
| 92 | +); |
| 93 | + |
| 94 | +CREATE TABLE /*$wgDBprefix*/templatelinks ( |
| 95 | + tl_from int NOT NULL default '0', |
| 96 | + tl_namespace int NOT NULL default '0', |
| 97 | + tl_title varchar(255) NOT NULL default '' |
| 98 | +); |
| 99 | + |
| 100 | +CREATE TABLE /*$wgDBprefix*/imagelinks ( |
| 101 | + il_from int NOT NULL default '0', |
| 102 | + il_to varchar(255) NOT NULL default '' |
| 103 | +); |
| 104 | + |
| 105 | +CREATE TABLE /*$wgDBprefix*/categorylinks ( |
| 106 | + cl_from int NOT NULL default '0', |
| 107 | + cl_to varchar(255) NOT NULL default '', |
| 108 | + cl_sortkey varchar(70) NOT NULL default '', |
| 109 | + cl_timestamp timestamp NOT NULL |
| 110 | +); |
| 111 | + |
| 112 | +CREATE TABLE /*$wgDBprefix*/category ( |
| 113 | + cat_id int NOT NULL IDENTITY(1,1), |
| 114 | + cat_title varchar(255) NOT NULL, |
| 115 | + cat_pages int NOT NULL default 0, |
| 116 | + cat_subcats int NOT NULL default 0, |
| 117 | + cat_files int NOT NULL default 0, |
| 118 | + cat_hidden tinyint NOT NULL default 0, |
| 119 | + PRIMARY KEY (cat_id) |
| 120 | +); |
| 121 | + |
| 122 | +CREATE TABLE /*$wgDBprefix*/externallinks ( |
| 123 | + el_from int NOT NULL default '0', |
| 124 | + el_to text NOT NULL, |
| 125 | + el_index text NOT NULL |
| 126 | +); |
| 127 | + |
| 128 | +CREATE TABLE /*$wgDBprefix*/langlinks ( |
| 129 | + ll_from int NOT NULL default '0', |
| 130 | + ll_lang varbinary(20) NOT NULL default 0, |
| 131 | + ll_title varchar(255) NOT NULL default '' |
| 132 | +); |
| 133 | + |
| 134 | +CREATE TABLE /*$wgDBprefix*/site_stats ( |
| 135 | + ss_row_id int NOT NULL, |
| 136 | + ss_total_views bigint default '0', |
| 137 | + ss_total_edits bigint default '0', |
| 138 | + ss_good_articles bigint default '0', |
| 139 | + ss_total_pages bigint default '-1', |
| 140 | + ss_users bigint default '-1', |
| 141 | + ss_admins int default '-1', |
| 142 | + ss_images int default '0' |
| 143 | +); |
| 144 | + |
| 145 | +CREATE TABLE /*$wgDBprefix*/hitcounter ( |
| 146 | + hc_id int NOT NULL |
| 147 | +); |
| 148 | + |
| 149 | +CREATE TABLE /*$wgDBprefix*/ipblocks ( |
| 150 | + ipb_id int NOT NULL IDENTITY(1,1), |
| 151 | + ipb_address text NOT NULL, |
| 152 | + ipb_user int NOT NULL default '0', |
| 153 | + ipb_by int NOT NULL default '0', |
| 154 | + ipb_by_text varchar(255) NOT NULL default '', |
| 155 | + ipb_reason text NOT NULL, |
| 156 | + ipb_timestamp binary(14) NOT NULL default 0, |
| 157 | + ipb_auto bit NOT NULL default 0, |
| 158 | + ipb_anon_only bit NOT NULL default 0, |
| 159 | + ipb_create_account bit NOT NULL default 1, |
| 160 | + ipb_enable_autoblock bit NOT NULL default '1', |
| 161 | + ipb_expiry varbinary(14) NOT NULL default 0, |
| 162 | + ipb_range_start text NOT NULL, |
| 163 | + ipb_range_end text NOT NULL, |
| 164 | + ipb_deleted bit NOT NULL default 0, |
| 165 | + ipb_block_email bit NOT NULL default 0, |
| 166 | + PRIMARY KEY (ipb_id) |
| 167 | +); |
| 168 | + |
| 169 | +CREATE TABLE /*$wgDBprefix*/image ( |
| 170 | + img_name varchar(255) NOT NULL default '', |
| 171 | + img_size int NOT NULL default '0', |
| 172 | + img_width int NOT NULL default '0', |
| 173 | + img_height int NOT NULL default '0', |
| 174 | + img_metadata text NOT NULL, |
| 175 | + img_bits int NOT NULL default '0', |
| 176 | + img_media_type TEXT default NULL, |
| 177 | + img_major_mime TEXT NOT NULL default "unknown", |
| 178 | + img_minor_mime varbinary(32) NOT NULL default 0, |
| 179 | + img_description text NOT NULL, |
| 180 | + img_user int NOT NULL default '0', |
| 181 | + img_user_text varchar(255) NOT NULL, |
| 182 | + img_timestamp varbinary(14) NOT NULL default 0, |
| 183 | + img_sha1 varbinary(32) NOT NULL default 0, |
| 184 | + PRIMARY KEY (img_name) |
| 185 | +); |
| 186 | + |
| 187 | +CREATE TABLE /*$wgDBprefix*/oldimage ( |
| 188 | + oi_name varchar(255) NOT NULL default '', |
| 189 | + oi_archive_name varchar(255) NOT NULL default '', |
| 190 | + oi_size int NOT NULL default 0, |
| 191 | + oi_width int NOT NULL default 0, |
| 192 | + oi_height int NOT NULL default 0, |
| 193 | + oi_bits int NOT NULL default 0, |
| 194 | + oi_description text NOT NULL, |
| 195 | + oi_user int NOT NULL default '0', |
| 196 | + oi_user_text varchar(255) NOT NULL, |
| 197 | + oi_timestamp binary(14) NOT NULL default 0, |
| 198 | + oi_metadata text NOT NULL, |
| 199 | + oi_media_type TEXT default NULL, |
| 200 | + oi_major_mime TEXT NOT NULL default "unknown", |
| 201 | + oi_minor_mime varbinary(32) NOT NULL default 0, |
| 202 | + oi_deleted tinyint NOT NULL default '0', |
| 203 | + oi_sha1 varbinary(32) NOT NULL default 0 |
| 204 | +); |
| 205 | + |
| 206 | +CREATE TABLE /*$wgDBprefix*/filearchive ( |
| 207 | + fa_id int NOT NULL IDENTITY(1,1), |
| 208 | + fa_name varchar(255) NOT NULL default '', |
| 209 | + fa_archive_name varchar(255) default '', |
| 210 | + fa_storage_group varbinary(16), |
| 211 | + fa_storage_key varbinary(64) default 0, |
| 212 | + fa_deleted_user int, |
| 213 | + fa_deleted_timestamp binary(14) default 0, |
| 214 | + fa_deleted_reason text, |
| 215 | + fa_size int default '0', |
| 216 | + fa_width int default '0', |
| 217 | + fa_height int default '0', |
| 218 | + fa_metadata text, |
| 219 | + fa_bits int default '0', |
| 220 | + fa_media_type TEXT default NULL, |
| 221 | + fa_major_mime TEXT default "unknown", |
| 222 | + fa_minor_mime varbinary(32) default 0, |
| 223 | + fa_description text, |
| 224 | + fa_user int default '0', |
| 225 | + fa_user_text varchar(255), |
| 226 | + fa_timestamp binary(14) default 0, |
| 227 | + fa_deleted tinyint NOT NULL default '0', |
| 228 | + PRIMARY KEY (fa_id) |
| 229 | +); |
| 230 | + |
| 231 | +CREATE TABLE /*$wgDBprefix*/recentchanges ( |
| 232 | + rc_id int NOT NULL IDENTITY(1,1), |
| 233 | + rc_timestamp varbinary(14) NOT NULL default 0, |
| 234 | + rc_cur_time varbinary(14) NOT NULL default 0, |
| 235 | + rc_user int NOT NULL default '0', |
| 236 | + rc_user_text varchar(255) NOT NULL, |
| 237 | + rc_namespace int NOT NULL default '0', |
| 238 | + rc_title varchar(255) NOT NULL default '', |
| 239 | + rc_comment varchar(255) NOT NULL default '', |
| 240 | + rc_minor tinyint NOT NULL default '0', |
| 241 | + rc_bot tinyint NOT NULL default '0', |
| 242 | + rc_new tinyint NOT NULL default '0', |
| 243 | + rc_cur_id int NOT NULL default '0', |
| 244 | + rc_this_oldid int NOT NULL default '0', |
| 245 | + rc_last_oldid int NOT NULL default '0', |
| 246 | + rc_type tinyint NOT NULL default '0', |
| 247 | + rc_moved_to_ns tinyint NOT NULL default '0', |
| 248 | + rc_moved_to_title varchar(255) NOT NULL default '', |
| 249 | + rc_patrolled tinyint NOT NULL default '0', |
| 250 | + rc_ip varbinary(40) NOT NULL default 0, |
| 251 | + rc_old_len int, |
| 252 | + rc_new_len int, |
| 253 | + rc_deleted tinyint NOT NULL default '0', |
| 254 | + rc_logid int NOT NULL default '0', |
| 255 | + rc_log_type varbinary(255) NULL default NULL, |
| 256 | + rc_log_action varbinary(255) NULL default NULL, |
| 257 | + rc_params text NULL, |
| 258 | + PRIMARY KEY (rc_id) |
| 259 | +); |
| 260 | + |
| 261 | +CREATE TABLE /*$wgDBprefix*/watchlist ( |
| 262 | + wl_user int NOT NULL, |
| 263 | + wl_namespace int NOT NULL default '0', |
| 264 | + wl_title varchar(255) NOT NULL default '', |
| 265 | + wl_notificationtimestamp varbinary(14) |
| 266 | +); |
| 267 | + |
| 268 | +CREATE TABLE /*$wgDBprefix*/math ( |
| 269 | + math_inputhash varbinary(16) NOT NULL, |
| 270 | + math_outputhash varbinary(16) NOT NULL, |
| 271 | + math_html_conservativeness tinyint NOT NULL, |
| 272 | + math_html text, |
| 273 | + math_mathml text |
| 274 | +); |
| 275 | + |
| 276 | +CREATE TABLE /*$wgDBprefix*/searchindex ( |
| 277 | + si_page int NOT NULL, |
| 278 | + si_title varchar(255) NOT NULL default '', |
| 279 | + si_text text NOT NULL |
| 280 | +); |
| 281 | + |
| 282 | +CREATE TABLE /*$wgDBprefix*/interwiki ( |
| 283 | + iw_prefix varchar(32) NOT NULL, |
| 284 | + iw_url text NOT NULL, |
| 285 | + iw_local bit NOT NULL, |
| 286 | + iw_trans tinyint NOT NULL default 0 |
| 287 | +); |
| 288 | + |
| 289 | +CREATE TABLE /*$wgDBprefix*/querycache ( |
| 290 | + qc_type varbinary(32) NOT NULL, |
| 291 | + qc_value int NOT NULL default '0', |
| 292 | + qc_namespace int NOT NULL default '0', |
| 293 | + qc_title varchar(255) NOT NULL default '' |
| 294 | +); |
| 295 | + |
| 296 | +CREATE TABLE /*$wgDBprefix*/objectcache ( |
| 297 | + keyname varbinary(255) NOT NULL default 0, |
| 298 | + value text, |
| 299 | + exptime datetime |
| 300 | +); |
| 301 | + |
| 302 | +CREATE TABLE /*$wgDBprefix*/transcache ( |
| 303 | + tc_url varbinary(255) NOT NULL, |
| 304 | + tc_contents text, |
| 305 | + tc_time int NOT NULL |
| 306 | +); |
| 307 | + |
| 308 | +CREATE TABLE /*$wgDBprefix*/logging ( |
| 309 | + log_id int NOT NULL IDENTITY(1,1), |
| 310 | + log_type varbinary(10) NOT NULL default 0, |
| 311 | + log_action varbinary(10) NOT NULL default 0, |
| 312 | + log_timestamp binary(14) NOT NULL default 0, |
| 313 | + log_user int NOT NULL default 0, |
| 314 | + log_namespace int NOT NULL default 0, |
| 315 | + log_title varchar(255) NOT NULL default '', |
| 316 | + log_comment varchar(255) NOT NULL default '', |
| 317 | + log_params text NOT NULL, |
| 318 | + log_deleted tinyint NOT NULL default '0', |
| 319 | + PRIMARY KEY (log_id) |
| 320 | +); |
| 321 | + |
| 322 | +CREATE TABLE /*$wgDBprefix*/trackbacks ( |
| 323 | + tb_id int IDENTITY(1,1), |
| 324 | + tb_page int REFERENCES /*$wgDBprefix*/page(page_id) ON DELETE CASCADE, |
| 325 | + tb_title varchar(255) NOT NULL, |
| 326 | + tb_url text NOT NULL, |
| 327 | + tb_ex text, |
| 328 | + tb_name varchar(255), |
| 329 | + PRIMARY KEY (tb_id) |
| 330 | +); |
| 331 | + |
| 332 | +CREATE TABLE /*$wgDBprefix*/job ( |
| 333 | + job_id int NOT NULL IDENTITY(1,1), |
| 334 | + job_cmd varbinary(60) NOT NULL default 0, |
| 335 | + job_namespace int NOT NULL, |
| 336 | + job_title varchar(255) NOT NULL, |
| 337 | + job_params text NOT NULL, |
| 338 | + PRIMARY KEY (job_id) |
| 339 | +); |
| 340 | + |
| 341 | +CREATE TABLE /*$wgDBprefix*/querycache_info ( |
| 342 | + qci_type varbinary(32) NOT NULL default 0, |
| 343 | + qci_timestamp binary(14) NOT NULL default 0 |
| 344 | +); |
| 345 | + |
| 346 | +CREATE TABLE /*$wgDBprefix*/redirect ( |
| 347 | + rd_from int NOT NULL default '0', |
| 348 | + rd_namespace int NOT NULL default '0', |
| 349 | + rd_title varchar(255) NOT NULL default '', |
| 350 | + PRIMARY KEY (rd_from) |
| 351 | +); |
| 352 | + |
| 353 | +CREATE TABLE /*$wgDBprefix*/querycachetwo ( |
| 354 | + qcc_type varbinary(32) NOT NULL, |
| 355 | + qcc_value int NOT NULL default '0', |
| 356 | + qcc_namespace int NOT NULL default '0', |
| 357 | + qcc_title varchar(255) NOT NULL default '', |
| 358 | + qcc_namespacetwo int NOT NULL default '0', |
| 359 | + qcc_titletwo varchar(255) NOT NULL default '' |
| 360 | +); |
| 361 | + |
| 362 | +CREATE TABLE /*$wgDBprefix*/page_restrictions ( |
| 363 | + pr_page int NOT NULL, |
| 364 | + pr_type varbinary(60) NOT NULL, |
| 365 | + pr_level varbinary(60) NOT NULL, |
| 366 | + pr_cascade tinyint NOT NULL, |
| 367 | + pr_user int NULL, |
| 368 | + pr_expiry varbinary(14) NULL, |
| 369 | + pr_id int NOT NULL IDENTITY(1,1), |
| 370 | + PRIMARY KEY (pr_page,pr_type) |
| 371 | +); |
| 372 | + |
| 373 | +CREATE TABLE /*$wgDBprefix*/protected_titles ( |
| 374 | + pt_namespace int NOT NULL, |
| 375 | + pt_title varchar(255) NOT NULL, |
| 376 | + pt_user int NOT NULL, |
| 377 | + pt_reason text, |
| 378 | + pt_timestamp binary(14) NOT NULL, |
| 379 | + pt_expiry varbinary(14) NOT NULL default 0, |
| 380 | + pt_create_perm varbinary(60) NOT NULL, |
| 381 | + PRIMARY KEY (pt_namespace,pt_title) |
| 382 | +); |
| 383 | + |
| 384 | +CREATE TABLE /*$wgDBprefix*/page_props ( |
| 385 | + pp_page int NOT NULL, |
| 386 | + pp_propname varbinary(60) NOT NULL, |
| 387 | + pp_value text NOT NULL, |
| 388 | + PRIMARY KEY (pp_page,pp_propname) |
| 389 | +); |
| 390 | + |
| 391 | +CREATE TABLE /*$wgDBprefix*/updatelog ( |
| 392 | + ul_key varchar(255) NOT NULL, |
| 393 | + PRIMARY KEY (ul_key) |
| 394 | +); |
| 395 | + |
| 396 | + |
Property changes on: trunk/phase3/maintenance/mssql/tables.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 397 | + native |