wiki.techinc.nl/maintenance/abstractSchemaChanges/patch-watchlist-namespace_title-rename-index.json
Amir Sarabadani db4315b942 Rename namespace_title index on watchlist to wl_namespace_title
Indexes need to have prefixes, to avoid clashes in several RDBMSes where
indexes are global

Bug: T266228
Change-Id: I96a04903f6123d1fb8081fcf15cdd1f29708d320
2020-11-16 15:24:24 +01:00

107 lines
2.9 KiB
JSON

{
"comment": "Rename namespace_title index to wl_namespace_title on watchlist (T266228)",
"before": {
"name": "watchlist",
"columns": [
{
"name": "wl_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "wl_user",
"type": "integer",
"options": { "notnull": true, "unsigned": true }
},
{
"name": "wl_namespace",
"type": "integer",
"options": { "notnull": true, "unsigned": false, "default": 0 }
},
{
"name": "wl_title",
"type": "binary",
"options": { "length": 255, "notnull": true, "default": "" }
},
{
"name": "wl_notificationtimestamp",
"comment": "Timestamp used to send notification e-mails and show 'updated since last visit' markers. Set to NULL when the user visits the latest revision of the page, which means that they should be sent an e-mail on the next change.",
"type": "mwtimestamp",
"options": { "notnull": false }
}
],
"indexes": [
{
"name": "wl_user",
"columns": [ "wl_user", "wl_namespace", "wl_title" ],
"comment": "Special:Watchlist",
"unique": true
},
{
"name": "namespace_title",
"columns": [ "wl_namespace", "wl_title" ],
"comment": "Special:Movepage (WatchedItemStore::duplicateEntry)",
"unique": false
},
{
"name": "wl_user_notificationtimestamp",
"columns": [ "wl_user", "wl_notificationtimestamp" ],
"comment": "ApiQueryWatchlistRaw changed filter",
"unique": false
}
],
"pk": [ "wl_id" ]
},
"after": {
"name": "watchlist",
"columns": [
{
"name": "wl_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "wl_user",
"type": "integer",
"options": { "notnull": true, "unsigned": true }
},
{
"name": "wl_namespace",
"type": "integer",
"options": { "notnull": true, "unsigned": false, "default": 0 }
},
{
"name": "wl_title",
"type": "binary",
"options": { "length": 255, "notnull": true, "default": "" }
},
{
"name": "wl_notificationtimestamp",
"comment": "Timestamp used to send notification e-mails and show 'updated since last visit' markers. Set to NULL when the user visits the latest revision of the page, which means that they should be sent an e-mail on the next change.",
"type": "mwtimestamp",
"options": { "notnull": false }
}
],
"indexes": [
{
"name": "wl_user",
"columns": [ "wl_user", "wl_namespace", "wl_title" ],
"comment": "Special:Watchlist",
"unique": true
},
{
"name": "wl_namespace_title",
"columns": [ "wl_namespace", "wl_title" ],
"comment": "Special:Movepage (WatchedItemStore::duplicateEntry)",
"unique": false
},
{
"name": "wl_user_notificationtimestamp",
"columns": [ "wl_user", "wl_notificationtimestamp" ],
"comment": "ApiQueryWatchlistRaw changed filter",
"unique": false
}
],
"pk": [ "wl_id" ]
}
}