diff options
Diffstat (limited to 'sql/abstractSchemaChanges/patch-drop-rev_page_id.json')
-rw-r--r-- | sql/abstractSchemaChanges/patch-drop-rev_page_id.json | 195 |
1 files changed, 195 insertions, 0 deletions
diff --git a/sql/abstractSchemaChanges/patch-drop-rev_page_id.json b/sql/abstractSchemaChanges/patch-drop-rev_page_id.json new file mode 100644 index 000000000000..0348193b9bc3 --- /dev/null +++ b/sql/abstractSchemaChanges/patch-drop-rev_page_id.json @@ -0,0 +1,195 @@ +{ + "comment": "Drop rev_page_id index on revision (T163532)", + "before": { + "name": "revision", + "comment": "Every edit of a page creates also a revision row. This stores metadata about the revision, and a reference to the text storage backend.", + "columns": [ + { + "name": "rev_id", + "comment": "Unique ID to identify each revision", + "type": "integer", + "options": { "unsigned": true, "notnull": true, "autoincrement": true } + }, + { + "name": "rev_page", + "comment": "Key to page_id. This should never be invalid", + "type": "integer", + "options": { "unsigned": true, "notnull": true } + }, + { + "name": "rev_comment_id", + "comment": "Key to comment.comment_id. Comment summarizing the change", + "type": "bigint", + "options": { "unsigned": true, "notnull": true, "default": 0 } + }, + { + "name": "rev_actor", + "comment": "Key to actor.actor_id of the user or IP who made this edit", + "type": "bigint", + "options": { "unsigned": true, "notnull": true, "default": 0 } + }, + { + "name": "rev_timestamp", + "comment": "Timestamp of when revision was created", + "type": "mwtimestamp", + "options": { "notnull": true } + }, + { + "name": "rev_minor_edit", + "comment": "Records whether the user marked the 'minor edit' checkbox. Many automated edits are marked as minor", + "type": "mwtinyint", + "options": { "notnull": true, "unsigned": true, "default": 0 } + }, + { + "name": "rev_deleted", + "comment": "Restrictions on who can access this revision", + "type": "mwtinyint", + "options": { "notnull": true, "unsigned": true, "default": 0 } + }, + { + "name": "rev_len", + "comment": "Length of this revision in bytes", + "type": "integer", + "options": { "unsigned": true, "notnull": false } + }, + { + "name": "rev_parent_id", + "comment": "Key to revision.rev_id. This field is used to add support for a tree structure (The Adjacency List Model)", + "type": "integer", + "options": { "unsigned": true, "notnull": false } + }, + { + "name": "rev_sha1", + "comment": "SHA-1 text content hash in base-36", + "type": "binary", + "options": { "length": 32, "notnull": true, "default": "" } + } + ], + "indexes": [ + { + "name": "rev_page_id", + "columns": [ "rev_page", "rev_id" ], + "comment": "The index is proposed for removal, do not use it in new code: T163532. Used for ordering revisions within a page by rev_id, which is usually incorrect, since rev_timestamp is normally the correct order. It can also be used by dumpBackup.php, if a page and rev_id range is specified.", + "unique": false + }, + { + "name": "rev_timestamp", + "columns": [ "rev_timestamp" ], + "comment": "Used by ApiQueryAllRevisions", + "unique": false + }, + { + "name": "rev_page_timestamp", + "columns": [ "rev_page", "rev_timestamp" ], + "comment": "History index", + "unique": false + }, + { + "name": "rev_actor_timestamp", + "columns": [ "rev_actor", "rev_timestamp", "rev_id" ], + "comment": "User contributions index", + "unique": false + }, + { + "name": "rev_page_actor_timestamp", + "columns": [ "rev_page", "rev_actor", "rev_timestamp" ], + "comment": "Credits index. This is scanned in order to compile credits lists for pages, in ApiQueryContributors. Also for ApiQueryRevisions if rvuser is specified", + "unique": false + } + ], + "pk": [ "rev_id" ] + }, + "after": { + "name": "revision", + "comment": "Every edit of a page creates also a revision row. This stores metadata about the revision, and a reference to the text storage backend.", + "columns": [ + { + "name": "rev_id", + "comment": "Unique ID to identify each revision", + "type": "integer", + "options": { "unsigned": true, "notnull": true, "autoincrement": true } + }, + { + "name": "rev_page", + "comment": "Key to page_id. This should never be invalid", + "type": "integer", + "options": { "unsigned": true, "notnull": true } + }, + { + "name": "rev_comment_id", + "comment": "Key to comment.comment_id. Comment summarizing the change", + "type": "bigint", + "options": { "unsigned": true, "notnull": true, "default": 0 } + }, + { + "name": "rev_actor", + "comment": "Key to actor.actor_id of the user or IP who made this edit", + "type": "bigint", + "options": { "unsigned": true, "notnull": true, "default": 0 } + }, + { + "name": "rev_timestamp", + "comment": "Timestamp of when revision was created", + "type": "mwtimestamp", + "options": { "notnull": true } + }, + { + "name": "rev_minor_edit", + "comment": "Records whether the user marked the 'minor edit' checkbox. Many automated edits are marked as minor", + "type": "mwtinyint", + "options": { "notnull": true, "unsigned": true, "default": 0 } + }, + { + "name": "rev_deleted", + "comment": "Restrictions on who can access this revision", + "type": "mwtinyint", + "options": { "notnull": true, "unsigned": true, "default": 0 } + }, + { + "name": "rev_len", + "comment": "Length of this revision in bytes", + "type": "integer", + "options": { "unsigned": true, "notnull": false } + }, + { + "name": "rev_parent_id", + "comment": "Key to revision.rev_id. This field is used to add support for a tree structure (The Adjacency List Model)", + "type": "integer", + "options": { "unsigned": true, "notnull": false } + }, + { + "name": "rev_sha1", + "comment": "SHA-1 text content hash in base-36", + "type": "binary", + "options": { "length": 32, "notnull": true, "default": "" } + } + ], + "indexes": [ + { + "name": "rev_timestamp", + "columns": [ "rev_timestamp" ], + "comment": "Used by ApiQueryAllRevisions", + "unique": false + }, + { + "name": "rev_page_timestamp", + "columns": [ "rev_page", "rev_timestamp" ], + "comment": "History index", + "unique": false + }, + { + "name": "rev_actor_timestamp", + "columns": [ "rev_actor", "rev_timestamp", "rev_id" ], + "comment": "User contributions index", + "unique": false + }, + { + "name": "rev_page_actor_timestamp", + "columns": [ "rev_page", "rev_actor", "rev_timestamp" ], + "comment": "Credits index. This is scanned in order to compile credits lists for pages, in ApiQueryContributors. Also for ApiQueryRevisions if rvuser is specified", + "unique": false + } + ], + "pk": [ "rev_id" ] + } +} |