Index: branches/license-work/phase3/maintenance/tables.sql |
— | — | @@ -1437,19 +1437,31 @@ |
1438 | 1438 | ) /*$wgDBTableOptions*/; |
1439 | 1439 | CREATE UNIQUE INDEX /*i*/md_module_skin ON /*_*/module_deps (md_module, md_skin); |
1440 | 1440 | |
| 1441 | +-- Table listing licenses used for files on the wiki |
1441 | 1442 | CREATE TABLE /*_*/license ( |
1442 | 1443 | lic_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 1444 | + -- Internal license name. Display name is stored in i18n message |
1443 | 1445 | lic_name varbinary(255) NOT NULL, |
| 1446 | + -- URL to the legally valid license text. Localized or more understandable versions are stored in an i18n message |
1444 | 1447 | lic_url varbinary(255) NOT NULL, |
| 1448 | + -- Counter counting the number of files with this license |
1445 | 1449 | lic_count int signed NOT NULL DEFAULT 0 |
1446 | 1450 | ) /*$wgDBTableOptions*/; |
1447 | 1451 | CREATE INDEX /*i*/lic_name ON /*_*/license (lic_name); |
1448 | 1452 | CREATE INDEX /*i*/lic_count ON /*_*/license (lic_count); |
1449 | 1453 | |
| 1454 | +-- Table for tracking file properties |
| 1455 | +-- Each file property (fp_id) can have multiple rows in this table, |
| 1456 | +-- allowing for multiple properties and multiple values for each property. |
| 1457 | +-- Properties can have a numerical value, a text value, or both. |
1450 | 1458 | CREATE TABLE /*_*/file_props ( |
1451 | | - fp_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 1459 | + -- File property ID. This is the same for each row referring to the same file revision |
| 1460 | + fp_id int unsigned NOT NULL, |
| 1461 | + -- Property key |
1452 | 1462 | fp_key varbinary(255) NOT NULL, |
| 1463 | + -- Numerical property value, if present |
1453 | 1464 | fp_value_int int signed, |
| 1465 | + -- Textual property value, if present |
1454 | 1466 | fp_value_text varbinary(255) |
1455 | 1467 | ) /*$wgDBTableOptions*/; |
1456 | 1468 | CREATE INDEX /*i*/fp_id_key ON /*_*/file_props (fp_id, fp_key); |