It makes it more consistent with AUTO_INCREMENT PRIMARY KEY columns on other tables. This includes ipblocks.ipb_parent_block_id and ipblocks_restrictions.ir_ipb_id as well This patch doesn't apply to Postgres. Bug: T297208 Change-Id: I950aba63b2b226abbaf4010fbb51415bbff117f4
477 lines
11 KiB
JSON
477 lines
11 KiB
JSON
{
|
|
"comment": "Set unsigned true for ipb_id and ipb_parent_block_id in ipblocks table",
|
|
"before": {
|
|
"name": "ipblocks",
|
|
"comment": "Blocks against user accounts, IP addresses and IP ranges.",
|
|
"columns": [
|
|
{
|
|
"name": "ipb_id",
|
|
"comment": "Primary key, introduced for privacy.",
|
|
"type": "integer",
|
|
"options": {
|
|
"autoincrement": true,
|
|
"notnull": true
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_address",
|
|
"comment": "Blocked IP address in dotted-quad form or user name.",
|
|
"type": "blob",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 255
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_user",
|
|
"comment": "Blocked user ID or 0 for IP blocks.",
|
|
"type": "integer",
|
|
"options": {
|
|
"unsigned": true,
|
|
"notnull": true,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_by_actor",
|
|
"comment": "Actor who made the block.",
|
|
"type": "bigint",
|
|
"options": {
|
|
"unsigned": true,
|
|
"notnull": true
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_reason_id",
|
|
"comment": "Key to comment_id. Text comment made by blocker.",
|
|
"type": "bigint",
|
|
"options": {
|
|
"unsigned": true,
|
|
"notnull": true
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_timestamp",
|
|
"comment": "Creation (or refresh) date in standard YMDHMS form. IP blocks expire automatically.",
|
|
"type": "mwtimestamp",
|
|
"options": {
|
|
"notnull": true
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_auto",
|
|
"comment": "Indicates that the IP address was banned because a banned user accessed a page through it. If this is 1, ipb_address will be hidden, and the block identified by block ID number.",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 1,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_anon_only",
|
|
"comment": "If set to 1, block applies only to logged-out users",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 1,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_create_account",
|
|
"comment": "Block prevents account creation from matching IP addresses",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 1,
|
|
"default": 1
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_enable_autoblock",
|
|
"comment": "Block triggers autoblocks",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 1,
|
|
"default": 1
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_expiry",
|
|
"comment": "Time at which the block will expire. May be \"infinity\"",
|
|
"type": "mwtimestamp",
|
|
"options": {
|
|
"notnull": true,
|
|
"CustomSchemaOptions": {
|
|
"allowInfinite": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_range_start",
|
|
"comment": "Start of an address range, in hexadecimal size chosen to allow IPv6. FIXME: this field were originally blank for single-IP blocks, but now it's populated. No migration was ever done. It should be fixed to be blank again for such blocks (T51504).",
|
|
"type": "blob",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 255
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_range_end",
|
|
"comment": "End of an address range, in hexadecimal size chosen to allow IPv6. FIXME: this field were originally blank for single-IP blocks, but now it's populated. No migration was ever done. It should be fixed to be blank again for such blocks (T51504).",
|
|
"type": "blob",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 255
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_deleted",
|
|
"comment": "Flag for entries hidden from users and Sysops",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 1,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_block_email",
|
|
"comment": "Block prevents user from accessing Special:Emailuser",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 1,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_allow_usertalk",
|
|
"comment": "Block allows user to edit their own talk page",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 1,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_parent_block_id",
|
|
"comment": "ID of the block that caused this block to exist. Autoblocks set this to the original block so that the original block being deleted also deletes the autoblocks",
|
|
"type": "integer",
|
|
"options": {
|
|
"notnull": false,
|
|
"default": null
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_sitewide",
|
|
"comment": "Block user from editing any page on the site (other than their own user talk page).",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 1,
|
|
"default": 1
|
|
}
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "ipb_address_unique",
|
|
"comment": "Unique index to support \"user already blocked\" messages. Any new options which prevent collisions should be included",
|
|
"columns": [
|
|
"ipb_address",
|
|
"ipb_user",
|
|
"ipb_auto"
|
|
],
|
|
"unique": true,
|
|
"options": { "lengths": [ 255, null, null ] }
|
|
},
|
|
{
|
|
"name": "ipb_user",
|
|
"comment": "For querying whether a logged-in user is blocked",
|
|
"columns": [
|
|
"ipb_user"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "ipb_range",
|
|
"comment": "For querying whether an IP address is in any range",
|
|
"columns": [
|
|
"ipb_range_start",
|
|
"ipb_range_end"
|
|
],
|
|
"unique": false,
|
|
"options": { "lengths": [ 8, 8 ] }
|
|
},
|
|
{
|
|
"name": "ipb_timestamp",
|
|
"comment": "Index for Special:BlockList",
|
|
"columns": [
|
|
"ipb_timestamp"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "ipb_expiry",
|
|
"comment": "Index for table pruning",
|
|
"columns": [
|
|
"ipb_expiry"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "ipb_parent_block_id",
|
|
"comment": "Index for removing autoblocks when a parent block is removed",
|
|
"columns": [
|
|
"ipb_parent_block_id"
|
|
],
|
|
"unique": false
|
|
}
|
|
],
|
|
"pk": [
|
|
"ipb_id"
|
|
]
|
|
},
|
|
"after": {
|
|
"name": "ipblocks",
|
|
"comment": "Blocks against user accounts, IP addresses and IP ranges.",
|
|
"columns": [
|
|
{
|
|
"name": "ipb_id",
|
|
"comment": "Primary key, introduced for privacy.",
|
|
"type": "integer",
|
|
"options": {
|
|
"autoincrement": true,
|
|
"notnull": true,
|
|
"unsigned": true
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_address",
|
|
"comment": "Blocked IP address in dotted-quad form or user name.",
|
|
"type": "blob",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 255
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_user",
|
|
"comment": "Blocked user ID or 0 for IP blocks.",
|
|
"type": "integer",
|
|
"options": {
|
|
"unsigned": true,
|
|
"notnull": true,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_by_actor",
|
|
"comment": "Actor who made the block.",
|
|
"type": "bigint",
|
|
"options": {
|
|
"unsigned": true,
|
|
"notnull": true
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_reason_id",
|
|
"comment": "Key to comment_id. Text comment made by blocker.",
|
|
"type": "bigint",
|
|
"options": {
|
|
"unsigned": true,
|
|
"notnull": true
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_timestamp",
|
|
"comment": "Creation (or refresh) date in standard YMDHMS form. IP blocks expire automatically.",
|
|
"type": "mwtimestamp",
|
|
"options": {
|
|
"notnull": true
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_auto",
|
|
"comment": "Indicates that the IP address was banned because a banned user accessed a page through it. If this is 1, ipb_address will be hidden, and the block identified by block ID number.",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 1,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_anon_only",
|
|
"comment": "If set to 1, block applies only to logged-out users",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 1,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_create_account",
|
|
"comment": "Block prevents account creation from matching IP addresses",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 1,
|
|
"default": 1
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_enable_autoblock",
|
|
"comment": "Block triggers autoblocks",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 1,
|
|
"default": 1
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_expiry",
|
|
"comment": "Time at which the block will expire. May be \"infinity\"",
|
|
"type": "mwtimestamp",
|
|
"options": {
|
|
"notnull": true,
|
|
"CustomSchemaOptions": {
|
|
"allowInfinite": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_range_start",
|
|
"comment": "Start of an address range, in hexadecimal size chosen to allow IPv6. FIXME: this field were originally blank for single-IP blocks, but now it's populated. No migration was ever done. It should be fixed to be blank again for such blocks (T51504).",
|
|
"type": "blob",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 255
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_range_end",
|
|
"comment": "End of an address range, in hexadecimal size chosen to allow IPv6. FIXME: this field were originally blank for single-IP blocks, but now it's populated. No migration was ever done. It should be fixed to be blank again for such blocks (T51504).",
|
|
"type": "blob",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 255
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_deleted",
|
|
"comment": "Flag for entries hidden from users and Sysops",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 1,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_block_email",
|
|
"comment": "Block prevents user from accessing Special:Emailuser",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 1,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_allow_usertalk",
|
|
"comment": "Block allows user to edit their own talk page",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 1,
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_parent_block_id",
|
|
"comment": "ID of the block that caused this block to exist. Autoblocks set this to the original block so that the original block being deleted also deletes the autoblocks",
|
|
"type": "integer",
|
|
"options": {
|
|
"notnull": false,
|
|
"unsigned": true,
|
|
"default": null
|
|
}
|
|
},
|
|
{
|
|
"name": "ipb_sitewide",
|
|
"comment": "Block user from editing any page on the site (other than their own user talk page).",
|
|
"type": "mwtinyint",
|
|
"options": {
|
|
"notnull": true,
|
|
"length": 1,
|
|
"default": 1
|
|
}
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "ipb_address_unique",
|
|
"comment": "Unique index to support \"user already blocked\" messages. Any new options which prevent collisions should be included",
|
|
"columns": [
|
|
"ipb_address",
|
|
"ipb_user",
|
|
"ipb_auto"
|
|
],
|
|
"unique": true,
|
|
"options": { "lengths": [ 255, null, null ] }
|
|
},
|
|
{
|
|
"name": "ipb_user",
|
|
"comment": "For querying whether a logged-in user is blocked",
|
|
"columns": [
|
|
"ipb_user"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "ipb_range",
|
|
"comment": "For querying whether an IP address is in any range",
|
|
"columns": [
|
|
"ipb_range_start",
|
|
"ipb_range_end"
|
|
],
|
|
"unique": false,
|
|
"options": { "lengths": [ 8, 8 ] }
|
|
},
|
|
{
|
|
"name": "ipb_timestamp",
|
|
"comment": "Index for Special:BlockList",
|
|
"columns": [
|
|
"ipb_timestamp"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "ipb_expiry",
|
|
"comment": "Index for table pruning",
|
|
"columns": [
|
|
"ipb_expiry"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "ipb_parent_block_id",
|
|
"comment": "Index for removing autoblocks when a parent block is removed",
|
|
"columns": [
|
|
"ipb_parent_block_id"
|
|
],
|
|
"unique": false
|
|
}
|
|
],
|
|
"pk": [
|
|
"ipb_id"
|
|
]
|
|
}
|
|
}
|