170 lines
5.9 KiB
JSON
170 lines
5.9 KiB
JSON
{
|
|
"comment": "Rename all indexes to have 'site_' prefix (T270033)",
|
|
"before": {
|
|
"name": "sites",
|
|
"comment": "Holds all the sites known to the wiki.",
|
|
"columns": [
|
|
{
|
|
"name": "site_id",
|
|
"type": "integer",
|
|
"comment": "Numeric id of the site",
|
|
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
|
|
},
|
|
{
|
|
"name": "site_global_key",
|
|
"type": "binary",
|
|
"comment": "Global identifier for the site, ie 'enwiktionary'",
|
|
"options": { "notnull": true, "length": 64 }
|
|
},
|
|
{
|
|
"name": "site_type",
|
|
"type": "binary",
|
|
"comment": "Type of the site, ie 'mediawiki'",
|
|
"options": { "notnull": true, "length": 32 }
|
|
},
|
|
{
|
|
"name": "site_group",
|
|
"type": "binary",
|
|
"comment": "Group of the site, ie 'wikipedia'",
|
|
"options": { "notnull": true, "length": 32 }
|
|
},
|
|
{
|
|
"name": "site_source",
|
|
"type": "binary",
|
|
"comment": "Source of the site data, ie 'local', 'wikidata', 'my-magical-repo'",
|
|
"options": { "notnull": true, "length": 32 }
|
|
},
|
|
{
|
|
"name": "site_language",
|
|
"type": "binary",
|
|
"comment": "Language code of the sites primary language.",
|
|
"options": { "notnull": true, "length": 35 }
|
|
},
|
|
{
|
|
"name": "site_protocol",
|
|
"type": "binary",
|
|
"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.",
|
|
"options": { "notnull": true, "length": 32 }
|
|
},
|
|
{
|
|
"name": "site_domain",
|
|
"type": "string",
|
|
"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.",
|
|
"options": { "notnull": true, "length": 255 }
|
|
},
|
|
{
|
|
"name": "site_data",
|
|
"type": "blob",
|
|
"comment": "Type dependent site data.",
|
|
"options": { "notnull": true, "length": 65530 }
|
|
},
|
|
{
|
|
"name": "site_forward",
|
|
"type": "mwtinyint",
|
|
"comment": "If site.tld/path/key:pageTitle should forward users to the page on the actual site, where \"key\" is the local identifier.",
|
|
"options": { "notnull": true, "length": 1 }
|
|
},
|
|
{
|
|
"name": "site_config",
|
|
"type": "blob",
|
|
"comment": "Type dependent site config. For instance if template transclusion should be allowed if it's a MediaWiki.",
|
|
"options": { "notnull": true, "length": 65530 }
|
|
}
|
|
],
|
|
"indexes": [
|
|
{ "name": "sites_global_key", "columns": [ "site_global_key" ], "unique": true },
|
|
{ "name": "sites_type", "columns": [ "site_type" ], "unique": false },
|
|
{ "name": "sites_group", "columns": [ "site_group" ], "unique": false },
|
|
{ "name": "sites_source", "columns": [ "site_source" ], "unique": false },
|
|
{ "name": "sites_language", "columns": [ "site_language" ], "unique": false },
|
|
{ "name": "sites_protocol", "columns": [ "site_protocol" ], "unique": false },
|
|
{ "name": "sites_domain", "columns": [ "site_domain" ], "unique": false },
|
|
{ "name": "sites_forward", "columns": [ "site_forward" ], "unique": false }
|
|
],
|
|
"pk": [ "site_id" ]
|
|
},
|
|
"after": {
|
|
"name": "sites",
|
|
"comment": "Holds all the sites known to the wiki.",
|
|
"columns": [
|
|
{
|
|
"name": "site_id",
|
|
"type": "integer",
|
|
"comment": "Numeric id of the site",
|
|
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
|
|
},
|
|
{
|
|
"name": "site_global_key",
|
|
"type": "binary",
|
|
"comment": "Global identifier for the site, ie 'enwiktionary'",
|
|
"options": { "notnull": true, "length": 64 }
|
|
},
|
|
{
|
|
"name": "site_type",
|
|
"type": "binary",
|
|
"comment": "Type of the site, ie 'mediawiki'",
|
|
"options": { "notnull": true, "length": 32 }
|
|
},
|
|
{
|
|
"name": "site_group",
|
|
"type": "binary",
|
|
"comment": "Group of the site, ie 'wikipedia'",
|
|
"options": { "notnull": true, "length": 32 }
|
|
},
|
|
{
|
|
"name": "site_source",
|
|
"type": "binary",
|
|
"comment": "Source of the site data, ie 'local', 'wikidata', 'my-magical-repo'",
|
|
"options": { "notnull": true, "length": 32 }
|
|
},
|
|
{
|
|
"name": "site_language",
|
|
"type": "binary",
|
|
"comment": "Language code of the sites primary language.",
|
|
"options": { "notnull": true, "length": 35 }
|
|
},
|
|
{
|
|
"name": "site_protocol",
|
|
"type": "binary",
|
|
"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.",
|
|
"options": { "notnull": true, "length": 32 }
|
|
},
|
|
{
|
|
"name": "site_domain",
|
|
"type": "string",
|
|
"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.",
|
|
"options": { "notnull": true, "length": 255 }
|
|
},
|
|
{
|
|
"name": "site_data",
|
|
"type": "blob",
|
|
"comment": "Type dependent site data.",
|
|
"options": { "notnull": true, "length": 65530 }
|
|
},
|
|
{
|
|
"name": "site_forward",
|
|
"type": "mwtinyint",
|
|
"comment": "If site.tld/path/key:pageTitle should forward users to the page on the actual site, where \"key\" is the local identifier.",
|
|
"options": { "notnull": true, "length": 1 }
|
|
},
|
|
{
|
|
"name": "site_config",
|
|
"type": "blob",
|
|
"comment": "Type dependent site config. For instance if template transclusion should be allowed if it's a MediaWiki.",
|
|
"options": { "notnull": true, "length": 65530 }
|
|
}
|
|
],
|
|
"indexes": [
|
|
{ "name": "site_global_key", "columns": [ "site_global_key" ], "unique": true },
|
|
{ "name": "site_type", "columns": [ "site_type" ], "unique": false },
|
|
{ "name": "site_group", "columns": [ "site_group" ], "unique": false },
|
|
{ "name": "site_source", "columns": [ "site_source" ], "unique": false },
|
|
{ "name": "site_language", "columns": [ "site_language" ], "unique": false },
|
|
{ "name": "site_protocol", "columns": [ "site_protocol" ], "unique": false },
|
|
{ "name": "site_domain", "columns": [ "site_domain" ], "unique": false },
|
|
{ "name": "site_forward", "columns": [ "site_forward" ], "unique": false }
|
|
],
|
|
"pk": [ "site_id" ]
|
|
}
|
|
}
|