* Drop default value from rev_actor and rev_comment_id * Make rev_id a bigint Bug: T215466 Depends-On: I88318d7bcc063bc86a56eeb5f00048ea6e81964b Change-Id: Id0a3d920e8b2dc8643fa3c0341b34ab3ed5761dc
188 lines
5.7 KiB
JSON
188 lines
5.7 KiB
JSON
{
|
|
"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" ]
|
|
}
|
|
}
|