| 1 | { |
| 2 | "comment": "Drop unused indexes of sites table", |
| 3 | "before": { |
| 4 | "name": "sites", |
| 5 | "comment": "Holds all the sites known to the wiki.", |
| 6 | "columns": [ |
| 7 | { |
| 8 | "name": "site_id", |
| 9 | "type": "integer", |
| 10 | "comment": "Numeric id of the site", |
| 11 | "options": { "unsigned": true, "notnull": true, "autoincrement": true } |
| 12 | }, |
| 13 | { |
| 14 | "name": "site_global_key", |
| 15 | "type": "binary", |
| 16 | "comment": "Global identifier for the site, ie 'enwiktionary'", |
| 17 | "options": { "notnull": true, "length": 64 } |
| 18 | }, |
| 19 | { |
| 20 | "name": "site_type", |
| 21 | "type": "binary", |
| 22 | "comment": "Type of the site, ie 'mediawiki'", |
| 23 | "options": { "notnull": true, "length": 32 } |
| 24 | }, |
| 25 | { |
| 26 | "name": "site_group", |
| 27 | "type": "binary", |
| 28 | "comment": "Group of the site, ie 'wikipedia'", |
| 29 | "options": { "notnull": true, "length": 32 } |
| 30 | }, |
| 31 | { |
| 32 | "name": "site_source", |
| 33 | "type": "binary", |
| 34 | "comment": "Source of the site data, ie 'local', 'wikidata', 'my-magical-repo'", |
| 35 | "options": { "notnull": true, "length": 32 } |
| 36 | }, |
| 37 | { |
| 38 | "name": "site_language", |
| 39 | "type": "binary", |
| 40 | "comment": "Language code of the sites primary language.", |
| 41 | "options": { "notnull": true, "length": 35 } |
| 42 | }, |
| 43 | { |
| 44 | "name": "site_protocol", |
| 45 | "type": "binary", |
| 46 | "comment": "Protocol of the site, ie 'http://', 'irc://', '//'. This field is an index for lookups and is build from type specific data in site_data.", |
| 47 | "options": { "notnull": true, "length": 32 } |
| 48 | }, |
| 49 | { |
| 50 | "name": "site_domain", |
| 51 | "type": "string", |
| 52 | "comment": "Domain of the site in reverse order, ie 'org.mediawiki.www.'. This field is an index for lookups and is build from type specific data in site_data.", |
| 53 | "options": { "notnull": true, "length": 255 } |
| 54 | }, |
| 55 | { |
| 56 | "name": "site_data", |
| 57 | "type": "blob", |
| 58 | "comment": "Type dependent site data.", |
| 59 | "options": { "notnull": true, "length": 65530 } |
| 60 | }, |
| 61 | { |
| 62 | "name": "site_forward", |
| 63 | "type": "mwtinyint", |
| 64 | "comment": "If site.tld/path/key:pageTitle should forward users to the page on the actual site, where \"key\" is the local identifier.", |
| 65 | "options": { "notnull": true, "length": 1 } |
| 66 | }, |
| 67 | { |
| 68 | "name": "site_config", |
| 69 | "type": "blob", |
| 70 | "comment": "Type dependent site config. For instance if template transclusion should be allowed if it's a MediaWiki.", |
| 71 | "options": { "notnull": true, "length": 65530 } |
| 72 | } |
| 73 | ], |
| 74 | "indexes": [ |
| 75 | { "name": "site_global_key", "columns": [ "site_global_key" ], "unique": true }, |
| 76 | { "name": "site_type", "columns": [ "site_type" ], "unique": false }, |
| 77 | { "name": "site_group", "columns": [ "site_group" ], "unique": false }, |
| 78 | { "name": "site_source", "columns": [ "site_source" ], "unique": false }, |
| 79 | { "name": "site_language", "columns": [ "site_language" ], "unique": false }, |
| 80 | { "name": "site_protocol", "columns": [ "site_protocol" ], "unique": false }, |
| 81 | { "name": "site_domain", "columns": [ "site_domain" ], "unique": false }, |
| 82 | { "name": "site_forward", "columns": [ "site_forward" ], "unique": false } |
| 83 | ], |
| 84 | "pk": [ "site_id" ] |
| 85 | }, |
| 86 | "after": { |
| 87 | "name": "sites", |
| 88 | "comment": "Holds all the sites known to the wiki.", |
| 89 | "columns": [ |
| 90 | { |
| 91 | "name": "site_id", |
| 92 | "type": "integer", |
| 93 | "comment": "Numeric id of the site", |
| 94 | "options": { "unsigned": true, "notnull": true, "autoincrement": true } |
| 95 | }, |
| 96 | { |
| 97 | "name": "site_global_key", |
| 98 | "type": "binary", |
| 99 | "comment": "Global identifier for the site, ie 'enwiktionary'", |
| 100 | "options": { "notnull": true, "length": 64 } |
| 101 | }, |
| 102 | { |
| 103 | "name": "site_type", |
| 104 | "type": "binary", |
| 105 | "comment": "Type of the site, ie 'mediawiki'", |
| 106 | "options": { "notnull": true, "length": 32 } |
| 107 | }, |
| 108 | { |
| 109 | "name": "site_group", |
| 110 | "type": "binary", |
| 111 | "comment": "Group of the site, ie 'wikipedia'", |
| 112 | "options": { "notnull": true, "length": 32 } |
| 113 | }, |
| 114 | { |
| 115 | "name": "site_source", |
| 116 | "type": "binary", |
| 117 | "comment": "Source of the site data, ie 'local', 'wikidata', 'my-magical-repo'", |
| 118 | "options": { "notnull": true, "length": 32 } |
| 119 | }, |
| 120 | { |
| 121 | "name": "site_language", |
| 122 | "type": "binary", |
| 123 | "comment": "Language code of the sites primary language.", |
| 124 | "options": { "notnull": true, "length": 35 } |
| 125 | }, |
| 126 | { |
| 127 | "name": "site_protocol", |
| 128 | "type": "binary", |
| 129 | "comment": "Protocol of the site, ie 'http://', 'irc://', '//'. This field is an index for lookups and is build from type specific data in site_data.", |
| 130 | "options": { "notnull": true, "length": 32 } |
| 131 | }, |
| 132 | { |
| 133 | "name": "site_domain", |
| 134 | "type": "string", |
| 135 | "comment": "Domain of the site in reverse order, ie 'org.mediawiki.www.'. This field is an index for lookups and is build from type specific data in site_data.", |
| 136 | "options": { "notnull": true, "length": 255 } |
| 137 | }, |
| 138 | { |
| 139 | "name": "site_data", |
| 140 | "type": "blob", |
| 141 | "comment": "Type dependent site data.", |
| 142 | "options": { "notnull": true, "length": 65530 } |
| 143 | }, |
| 144 | { |
| 145 | "name": "site_forward", |
| 146 | "type": "mwtinyint", |
| 147 | "comment": "If site.tld/path/key:pageTitle should forward users to the page on the actual site, where \"key\" is the local identifier.", |
| 148 | "options": { "notnull": true, "length": 1 } |
| 149 | }, |
| 150 | { |
| 151 | "name": "site_config", |
| 152 | "type": "blob", |
| 153 | "comment": "Type dependent site config. For instance if template transclusion should be allowed if it's a MediaWiki.", |
| 154 | "options": { "notnull": true, "length": 65530 } |
| 155 | } |
| 156 | ], |
| 157 | "indexes": [ |
| 158 | { "name": "site_global_key", "columns": [ "site_global_key" ], "unique": true } |
| 159 | ], |
| 160 | "pk": [ "site_id" ] |
| 161 | } |
| 162 | } |