Index: branches/license-work/phase3/maintenance/tables.sql |
— | — | @@ -307,8 +307,12 @@ |
308 | 308 | |
309 | 309 | -- Key to revision.rev_id |
310 | 310 | -- This field is used to add support for a tree structure (The Adjacency List Model) |
311 | | - rev_parent_id int unsigned default NULL |
| 311 | + rev_parent_id int unsigned default NULL, |
312 | 312 | |
| 313 | + -- Key to file_props.fp_id |
| 314 | + -- For revisions with no associated file properties, this is NULL |
| 315 | + rev_fileprops_id int unsigned default NULL |
| 316 | + |
313 | 317 | ) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=1024; |
314 | 318 | -- In case tables are created as MyISAM, use row hints for MySQL <5.0 to avoid 4GB limit |
315 | 319 | |
— | — | @@ -1433,4 +1437,23 @@ |
1434 | 1438 | ) /*$wgDBTableOptions*/; |
1435 | 1439 | CREATE UNIQUE INDEX /*i*/md_module_skin ON /*_*/module_deps (md_module, md_skin); |
1436 | 1440 | |
| 1441 | +CREATE TABLE /*_*/license ( |
| 1442 | + lic_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 1443 | + lic_name varbinary(255) NOT NULL, |
| 1444 | + lic_url varbinary(255) NOT NULL, |
| 1445 | + lic_count int signed NOT NULL DEFAULT 0 |
| 1446 | +) /*$wgDBTableOptions*/; |
| 1447 | +CREATE INDEX /*i*/lic_name ON /*_*/license (lic_name); |
| 1448 | +CREATE INDEX /*i*/lic_count ON /*_*/license (lic_count); |
| 1449 | + |
| 1450 | +CREATE TABLE /*_*/file_props ( |
| 1451 | + fp_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 1452 | + fp_key varbinary(255) NOT NULL, |
| 1453 | + fp_value_int int signed, |
| 1454 | + fp_value_text varbinary(255) |
| 1455 | +) /*$wgDBTableOptions*/; |
| 1456 | +CREATE INDEX /*i*/fp_id_key ON /*_*/file_props (fp_id, fp_key); |
| 1457 | +CREATE INDEX /*i*/fp_key_value_int ON /*_*/file_props (fp_key, fp_value_int); |
| 1458 | +CREATE INDEX /*i*/fp_key_value_text ON /*_*/file_props (fp_key, fp_value_text); |
| 1459 | + |
1437 | 1460 | -- vim: sw=2 sts=2 et |