aboutsummaryrefslogtreecommitdiffstats
path: root/sql/abstractSchemaChanges/patch-revision-cleanup.json
diff options
context:
space:
mode:
Diffstat (limited to 'sql/abstractSchemaChanges/patch-revision-cleanup.json')
-rw-r--r--sql/abstractSchemaChanges/patch-revision-cleanup.json188
1 files changed, 188 insertions, 0 deletions
diff --git a/sql/abstractSchemaChanges/patch-revision-cleanup.json b/sql/abstractSchemaChanges/patch-revision-cleanup.json
new file mode 100644
index 000000000000..1c24e7070623
--- /dev/null
+++ b/sql/abstractSchemaChanges/patch-revision-cleanup.json
@@ -0,0 +1,188 @@
+{
+ "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_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": "bigint",
+ "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 }
+ },
+ {
+ "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 }
+ },
+ {
+ "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": "bigint",
+ "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" ]
+ }
+}