Manual:Ipblocks table/zh

The ipblocks table stores details of IP addresses and users who are blocked from editing. The name "ipblocks" is a legacy name, as now user account blocks are also stored in this table. For previous blocks, see.

ipb_id
主要密钥，为隐私而引入.

ipb_address
Blocked IP address in dotted-quad form or user name.

ipb_user
被封禁的用户ID或0表示IP.

ipb_by
实施封禁的管理员的用户ID.

ipb_by_text
实施封禁的管理员的用户名文本.

Deprecated in favor of ipb_by_actor.

ipb_by_actor
This is a foreign key to in the  table.

ipb_reason
管理员提供的封禁的原因.

ipb_reason_id and the comment table should be used instead!

ipb_reason_id
This is a foreign key to in the  table.

ipb_timestamp
Creation (or refresh) date in standard YMDHMS form.

ipb_auto
Indicates that the IP address was blocked because a blocked user accessed a page through it. 如果这是1，ipb_address将会隐藏.

ipb_anon_only
If set to 1, the block only applies to logged out users.

ipb_create_account
Prevents account creation from matching IP addresses.

ipb_enable_autoblock
在封禁上启用自动封禁.

ipb_expiry
Expiry time set by the administrator at the time of the block. A standard timestamp or the string 'infinity'.

ipb_range_start
IP段封中的第一个IP.

ipb_range_end
IP段封中的最后一个IP.

ipb_deleted
Allows the entry to be flagged, hiding it from users and sysops.

ipb_block_email
阻止用户访问Special:Emailuser.

ipb_allow_usertalk
Indicates whether the blocked user is blocked from editing their talk page. A value of 1 means that the user is allowed to edit their user talk page.

ipb_parent_block_id
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.

ipb_sitewide
指示封禁是站点范围还是部分封禁. A value of 0 indicates that the block is partial. A partial block can block a user from specific pages, namespaces or actions. If a partial block blocks a user from any pages or namespaces, these are stored in the table.

架构摘要
DESCRIBE ipblocks; +--+-+--+-+++ +--+-+--+-+++ +--+-+--+-+++
 * Field               | Type                | Null | Key | Default        | Extra          |
 * ipb_id              | int(11)             | NO   | PRI | NULL           | auto_increment |
 * ipb_address         | tinyblob            | NO   | MUL | NULL           |                |
 * ipb_user            | int(10) unsigned    | NO   | MUL | 0              |                |
 * ipb_by              | int(10) unsigned    | NO   |     | 0              |                |
 * ipb_by_text         | varbinary(255)      | NO   |     |                |                |
 * ipb_by_actor        | bigint(20) unsigned | NO   |     | 0              |                |
 * ipb_reason_id       | bigint(20) unsigned | NO   |     | NULL           |                |
 * ipb_timestamp       | binary(14)          | NO   | MUL |                |                |
 * ipb_auto            | tinyint(1)          | NO   |     | 0              |                |
 * ipb_anon_only       | tinyint(1)          | NO   |     | 0              |                |
 * ipb_create_account  | tinyint(1)          | NO   |     | 1              |                |
 * ipb_enable_autoblock | tinyint(1)         | NO   |     | 1              |                |
 * ipb_expiry          | varbinary(14)       | NO   | MUL |                |                |
 * ipb_range_start     | tinyblob            | NO   | MUL | NULL           |                |
 * ipb_range_end       | tinyblob            | NO   |     | NULL           |                |
 * ipb_deleted         | tinyint(1)          | NO   |     | 0              |                |
 * ipb_block_email     | tinyint(1)          | NO   |     | 0              |                |
 * ipb_allow_usertalk  | tinyint(1)          | NO   |     | 0              |                |
 * ipb_parent_block_id | int(11)             | YES  | MUL | NULL           |                |
 * ipb_sitewide        | tinyint(1)          | NO   |     | 1              |                |

DESCRIBE ipblocks; +--+-+--+-+++ +--+-+--+-+++ +--+-+--+-+++
 * Field               | Type                | Null | Key | Default        | Extra          |
 * ipb_id              | int(11)             | NO   | PRI | NULL           | auto_increment |
 * ipb_address         | tinyblob            | NO   | MUL | NULL           |                |
 * ipb_user            | int(10) unsigned    | NO   | MUL | 0              |                |
 * ipb_by              | int(10) unsigned    | NO   |     | 0              |                |
 * ipb_by_text         | varbinary(255)      | NO   |     |                |                |
 * ipb_by_actor        | bigint(20) unsigned | NO   |     | 0              |                |
 * ipb_reason          | varbinary(767)      | NO   |     |                |                |
 * ipb_reason_id       | bigint(20) unsigned | NO   |     | 0              |                |
 * ipb_timestamp       | binary(14)          | NO   | MUL |                |                |
 * ipb_auto            | tinyint(1)          | NO   |     | 0              |                |
 * ipb_anon_only       | tinyint(1)          | NO   |     | 0              |                |
 * ipb_create_account  | tinyint(1)          | NO   |     | 1              |                |
 * ipb_enable_autoblock | tinyint(1)         | NO   |     | 1              |                |
 * ipb_expiry          | varbinary(14)       | NO   | MUL |                |                |
 * ipb_range_start     | tinyblob            | NO   | MUL | NULL           |                |
 * ipb_range_end       | tinyblob            | NO   |     | NULL           |                |
 * ipb_deleted         | tinyint(1)          | NO   |     | 0              |                |
 * ipb_block_email     | tinyint(1)          | NO   |     | 0              |                |
 * ipb_allow_usertalk  | tinyint(1)          | NO   |     | 0              |                |
 * ipb_parent_block_id | int(11)             | YES  | MUL | NULL           |                |
 * ipb_sitewide        | tinyint(1)          | NO   |     | 1              |                |

DESCRIBE ipblocks; +--+-+--+-+++ +--+-+--+-+++ +--+-+--+-+++
 * Field               | Type                | Null | Key | Default        | Extra          |
 * ipb_id              | int(11)             | NO   | PRI | NULL           | auto_increment |
 * ipb_address         | tinyblob            | NO   | MUL | NULL           |                |
 * ipb_user            | int(10) unsigned    | NO   | MUL | 0              |                |
 * ipb_by              | int(10) unsigned    | NO   |     | 0              |                |
 * ipb_by_text         | varbinary(255)      | NO   |     |                |                |
 * ipb_by_actor        | bigint(20) unsigned | NO   |     | 0              |                |
 * ipb_reason          | varbinary(767)      | NO   |     |                |                |
 * ipb_reason_id       | bigint(20) unsigned | NO   |     | 0              |                |
 * ipb_timestamp       | binary(14)          | NO   | MUL |                |                |
 * ipb_auto            | tinyint(1)          | NO   |     | 0              |                |
 * ipb_anon_only       | tinyint(1)          | NO   |     | 0              |                |
 * ipb_create_account  | tinyint(1)          | NO   |     | 1              |                |
 * ipb_enable_autoblock | tinyint(1)         | NO   |     | 1              |                |
 * ipb_expiry          | varbinary(14)       | NO   | MUL |                |                |
 * ipb_range_start     | tinyblob            | NO   | MUL | NULL           |                |
 * ipb_range_end       | tinyblob            | NO   |     | NULL           |                |
 * ipb_deleted         | tinyint(1)          | NO   |     | 0              |                |
 * ipb_block_email     | tinyint(1)          | NO   |     | 0              |                |
 * ipb_allow_usertalk  | tinyint(1)          | NO   |     | 0              |                |
 * ipb_parent_block_id | int(11)             | YES  | MUL | NULL           |                |

DESCRIBE ipblocks; +--+-+--+-+++ +--+-+--+-+++ +--+-+--+-+++
 * Field               | Type                | Null | Key | Default        | Extra          |
 * ipb_id              | int(11)             | NO   | PRI | NULL           | auto_increment |
 * ipb_address         | tinyblob            | NO   | MUL | NULL           |                |
 * ipb_user            | int(10) unsigned    | NO   | MUL | 0              |                |
 * ipb_by              | int(10) unsigned    | NO   |     | 0              |                |
 * ipb_by_text         | varbinary(255)      | NO   |     |                |                |
 * ipb_reason          | varbinary(767)      | NO   |     |                |                |
 * ipb_reason_id       | bigint(20) unsigned | NO   |     | 0              |                |
 * ipb_timestamp       | binary(14)          | NO   | MUL |                |                |
 * ipb_auto            | tinyint(1)          | NO   |     | 0              |                |
 * ipb_anon_only       | tinyint(1)          | NO   |     | 0              |                |
 * ipb_create_account  | tinyint(1)          | NO   |     | 1              |                |
 * ipb_enable_autoblock | tinyint(1)         | NO   |     | 1              |                |
 * ipb_expiry          | varbinary(14)       | NO   | MUL |                |                |
 * ipb_range_start     | tinyblob            | NO   | MUL | NULL           |                |
 * ipb_range_end       | tinyblob            | NO   |     | NULL           |                |
 * ipb_deleted         | tinyint(1)          | NO   |     | 0              |                |
 * ipb_block_email     | tinyint(1)          | NO   |     | 0              |                |
 * ipb_allow_usertalk  | tinyint(1)          | NO   |     | 0              |                |
 * ipb_parent_block_id | int(11)             | YES  | MUL | NULL           |                |

DESCRIBE ipblocks; +--+--+--+-+++ +--+--+--+-+++ +--+--+--+-+++
 * Field               | Type             | Null | Key | Default        | Extra          |
 * ipb_id              | int(11)          | NO   | PRI | NULL           | auto_increment |
 * ipb_address         | tinyblob         | NO   | MUL | NULL           |                |
 * ipb_user            | int(10) unsigned | NO   | MUL | 0              |                |
 * ipb_by              | int(10) unsigned | NO   |     | 0              |                |
 * ipb_by_text         | varbinary(255)   | NO   |     |                |                |
 * ipb_reason          | varbinary(767)   | NO   |     | NULL           |                |
 * ipb_timestamp       | binary(14)       | NO   | MUL |                |                |
 * ipb_auto            | tinyint(1)       | NO   |     | 0              |                |
 * ipb_anon_only       | tinyint(1)       | NO   |     | 0              |                |
 * ipb_create_account  | tinyint(1)       | NO   |     | 1              |                |
 * ipb_enable_autoblock | tinyint(1)      | NO   |     | 1              |                |
 * ipb_expiry          | varbinary(14)    | NO   | MUL |                |                |
 * ipb_range_start     | tinyblob         | NO   | MUL | NULL           |                |
 * ipb_range_end       | tinyblob         | NO   |     | NULL           |                |
 * ipb_deleted         | tinyint(1)       | NO   |     | 0              |                |
 * ipb_block_email     | tinyint(1)       | NO   |     | 0              |                |
 * ipb_allow_usertalk  | tinyint(1)       | NO   |     | 0              |                |
 * ipb_parent_block_id | int(11)          | YES  | MUL | NULL           |                |

DESCRIBE ipblocks; +--+-+--+-+-++ +--+-+--+-+-++ +--+-+--+-+-++
 * Field               | Type                | Null | Key | Default | Extra          |
 * ipb_id              | int(8)              | NO   | PRI | NULL    | AUTO_INCREMENT |
 * ipb_address         | tinyblob            | NO   | MUL | NULL    |                |
 * ipb_user            | int(8) unsigned     | NO   | MUL | 0       |                |
 * ipb_by              | int(8) unsigned     | NO   |     | 0       |                |
 * ipb_by_text         | varchar(255) binary | NO   |     | NULL    |                |
 * ipb_reason          | tinyblob            | NO   |     | NULL    |                |
 * ipb_timestamp       | binary(14)          | NO   | MUL | NULL    |                |
 * ipb_auto            | bool                | NO   |     | 0       |                |
 * ipb_anon_only       | bool                | NO   |     | 0       |                |
 * ipb_create_account  | bool                | NO   |     | 1       |                |
 * ipb_enable_autoblock | bool               | NO   |     | 1       |                |
 * ipb_expiry          | varbinary(14)       | NO   | MUL | NULL    |                |
 * ipb_range_start     | tinyblob            | NO   | MUL | NULL    |                |
 * ipb_range_end       | tinyblob            | NO   |     | NULL    |                |
 * ipb_deleted         | bool                | NO   |     | 0       |                |
 * ipb_block_email     | bool                | NO   |     | 0       |                |
 * ipb_allow_usertalk  | bool                | NO   |     | 0       |                |
 * ipb_parent_block_id | int(10)             | YES  | MUL | NULL    |                |

DESCRIBE ipblocks; +--+-+--+-+-++ +--+-+--+-+-++ +--+-+--+-+-++
 * Field               | Type                | Null | Key | Default | Extra          |
 * ipb_id              | int(8)              | NO   | PRI | NULL    | AUTO_INCREMENT |
 * ipb_address         | tinyblob            | NO   | MUL | NULL    |                |
 * ipb_user            | int(8) unsigned     | NO   | MUL | 0       |                |
 * ipb_by              | int(8) unsigned     | NO   |     | 0       |                |
 * ipb_by_text         | varchar(255) binary | NO   |     | NULL    |                |
 * ipb_reason          | tinyblob            | NO   |     | NULL    |                |
 * ipb_timestamp       | binary(14)          | NO   | MUL | NULL    |                |
 * ipb_auto            | bool                | NO   |     | 0       |                |
 * ipb_anon_only       | bool                | NO   |     | 0       |                |
 * ipb_create_account  | bool                | NO   |     | 1       |                |
 * ipb_enable_autoblock | bool               | NO   |     | 1       |                |
 * ipb_expiry          | varbinary(14)       | NO   | MUL | NULL    |                |
 * ipb_range_start     | tinyblob            | NO   | MUL | NULL    |                |
 * ipb_range_end       | tinyblob            | NO   |     | NULL    |                |
 * ipb_deleted         | bool                | NO   |     | 0       |                |
 * ipb_block_email     | bool                | NO   |     | 0       |                |
 * ipb_allow_usertalk  | bool                | NO   |     | 0       |                |

DESCRIBE ipblocks; +--+-+--+-+-++ +--+-+--+-+-++ +--+-+--+-+-++
 * Field               | Type                | Null | Key | Default | Extra          |
 * ipb_id              | int(8)              | NO   | PRI | NULL    | AUTO_INCREMENT |
 * ipb_address         | tinyblob            | NO   | MUL | NULL    |                |
 * ipb_user            | int(8) unsigned     | NO   | MUL | 0       |                |
 * ipb_by              | int(8) unsigned     | NO   |     | 0       |                |
 * ipb_by_text         | varchar(255) binary | NO   |     | NULL    |                |
 * ipb_reason          | tinyblob            | NO   |     | NULL    |                |
 * ipb_timestamp       | binary(14)          | NO   | MUL | NULL    |                |
 * ipb_auto            | bool                | NO   |     | 0       |                |
 * ipb_anon_only       | bool                | NO   |     | 0       |                |
 * ipb_create_account  | bool                | NO   |     | 1       |                |
 * ipb_enable_autoblock | bool               | NO   |     | 1       |                |
 * ipb_expiry          | varbinary(14)       | NO   | MUL | NULL    |                |
 * ipb_range_start     | tinyblob            | NO   | MUL | NULL    |                |
 * ipb_range_end       | tinyblob            | NO   |     | NULL    |                |
 * ipb_deleted         | bool                | NO   |     | 0       |                |
 * ipb_block_email     | bool                | NO   |     | 0       |                |

DESCRIBE ipblocks;</tt> +--++--+-+-++ +--++--+-+-++ +--++--+-+-++
 * Field               | Type               | Null | Key | Default | Extra          |
 * ipb_id              | int(8)             | NO   | PRI | NULL    | AUTO_INCREMENT |
 * ipb_address         | tinyblob           | NO   | MUL | NULL    |                |
 * ipb_user            | int(8) unsigned    | NO   | MUL | 0       |                |
 * ipb_by              | int(8) unsigned    | NO   |     | 0       |                |
 * ipb_reason          | tinyblob           | NO   |     | NULL    |                |
 * ipb_timestamp       | binary(14)         | NO   | MUL | NULL    |                |
 * ipb_auto            | bool               | NO   |     | 0       |                |
 * ipb_anon_only       | bool               | NO   |     | 0       |                |
 * ipb_create_account  | bool               | NO   |     | 1       |                |
 * ipb_enable_autoblock | bool              | NO   |     | 1       |                |
 * ipb_expiry          | varbinary(14)      | NO   | MUL | NULL    |                |
 * ipb_range_start     | tinyblob           | NO   | MUL | NULL    |                |
 * ipb_range_end       | tinyblob           | NO   |     | NULL    |                |
 * ipb_deleted         | bool               | NO   |     | 0       |                |
 * ipb_block_email     | bool               | NO   |     | 0       |                |

DESCRIBE ipblocks;</tt> +--++--+-+-++ +--++--+-+-++ +--++--+-+-++
 * Field               | Type               | Null | Key | Default | Extra          |
 * ipb_id              | int(8)             | NO   | PRI | NULL    | AUTO_INCREMENT |
 * ipb_address         | tinyblob           | NO   | MUL | NULL    |                |
 * ipb_user            | int(8) unsigned    | NO   | MUL | 0       |                |
 * ipb_by              | int(8) unsigned    | NO   |     | 0       |                |
 * ipb_reason          | tinyblob           | NO   |     | NULL    |                |
 * ipb_timestamp       | binary(14)         | NO   | MUL | NULL    |                |
 * ipb_auto            | bool               | NO   |     | 0       |                |
 * ipb_anon_only       | bool               | NO   |     | 0       |                |
 * ipb_create_account  | bool               | NO   |     | 1       |                |
 * ipb_enable_autoblock | bool              | NO   |     | 1       |                |
 * ipb_expiry          | varbinary(14)      | NO   | MUL | NULL    |                |
 * ipb_range_start     | tinyblob           | NO   | MUL | NULL    |                |
 * ipb_range_end       | tinyblob           | NO   |     | NULL    |                |
 * ipb_deleted         | bool               | NO   |     | 0       |                |
 * ipb_block_email     | bool               | NO   |     | 0       |                |

DESCRIBE ipblocks;</tt> +--++--+-+-++ +--++--+-+-++ +--++--+-+-++
 * Field               | Type               | Null | Key | Default | Extra          |
 * ipb_id              | int(8)             | NO   | PRI | NULL    | AUTO_INCREMENT |
 * ipb_address         | tinyblob           | NO   | MUL | NULL    |                |
 * ipb_user            | int(8) unsigned    | NO   | MUL | 0       |                |
 * ipb_by              | int(8) unsigned    | NO   |     | 0       |                |
 * ipb_reason          | tinyblob           | NO   |     | NULL    |                |
 * ipb_timestamp       | binary(14)         | NO   | MUL | NULL    |                |
 * ipb_auto            | bool               | NO   |     | 0       |                |
 * ipb_anon_only       | bool               | NO   |     | 0       |                |
 * ipb_create_account  | bool               | NO   |     | 1       |                |
 * ipb_enable_autoblock | bool              | NO   |     | 1       |                |
 * ipb_expiry          | varbinary(14)      | NO   | MUL | NULL    |                |
 * ipb_range_start     | tinyblob           | NO   | MUL | NULL    |                |
 * ipb_range_end       | tinyblob           | NO   |     | NULL    |                |
 * ipb_deleted         | bool               | NO   |     | 0       |                |

DESCRIBE ipblocks;</tt> +--++--+-+-++ +--++--+-+-++ +--++--+-+-++
 * Field               | Type               | Null | Key | Default | Extra          |
 * ipb_id              | int(8)             | NO   | PRI | NULL    | AUTO_INCREMENT |
 * ipb_address         | tinyblob           | NO   | MUL | NULL    |                |
 * ipb_user            | int(8) unsigned    | NO   | MUL | 0       |                |
 * ipb_by              | int(8) unsigned    | NO   |     | 0       |                |
 * ipb_reason          | tinyblob           | NO   |     | NULL    |                |
 * ipb_timestamp       | char(14) binary    | NO   | MUL | NULL    |                |
 * ipb_auto            | bool               | NO   |     | 0       |                |
 * ipb_anon_only       | bool               | NO   |     | 0       |                |
 * ipb_create_account  | bool               | NO   |     | 1       |                |
 * ipb_enable_autoblock | bool              | NO   |     | 1       |                |
 * ipb_expiry          | char(14) binary    | NO   | MUL | NULL    |                |
 * ipb_range_start     | tinyblob           | NO   | MUL | NULL    |                |
 * ipb_range_end       | tinyblob           | NO   |     | NULL    |                |

DESCRIBE ipblocks;</tt> +++--+-+-++ +++--+-+-++ +++--+-+-++
 * Field             | Type               | Null | Key | Default | Extra          |
 * ipb_id            | int(8)             | NO   | PRI | NULL    | AUTO_INCREMENT |
 * ipb_address       | tinyblob           | NO   | MUL | NULL    |                |
 * ipb_user          | int(8) unsigned    | NO   | MUL | 0       |                |
 * ipb_by            | int(8) unsigned    | NO   |     | 0       |                |
 * ipb_reason        | tinyblob           | NO   |     | NULL    |                |
 * ipb_timestamp     | char(14) binary    | NO   | MUL | NULL    |                |
 * ipb_auto          | bool               | NO   |     | 0       |                |
 * ipb_anon_only     | bool               | NO   |     | 0       |                |
 * ipb_create_account | bool              | NO   |     | 1       |                |
 * ipb_expiry        | char(14) binary    | NO   | MUL | NULL    |                |
 * ipb_range_start   | tinyblob           | NO   | MUL | NULL    |                |
 * ipb_range_end     | tinyblob           | NO   |     | NULL    |                |

DESCRIBE ipblocks;</tt> +++--+-+-++ +++--+-+-++ +++--+-+-++
 * Field             | Type               | Null | Key | Default | Extra          |
 * ipb_id            | int(8)             | NO   | PRI | NULL    | AUTO_INCREMENT |
 * ipb_address       | varchar(40) binary | NO   | MUL | NULL    |                |
 * ipb_user          | int(8) unsigned    | NO   | MUL | 0       |                |
 * ipb_by            | int(8) unsigned    | NO   |     | 0       |                |
 * ipb_reason        | tinyblob           | NO   |     | NULL    |                |
 * ipb_timestamp     | char(14) binary    | NO   |     | NULL    |                |
 * ipb_auto          | tinyint(1)         | NO   |     | 0       |                |
 * ipb_expiry        | char(14) binary    | NO   |     | NULL    |                |
 * ipb_range_start   | varchar(32)        | NO   | MUL | NULL    |                |
 * ipb_range_end     | varchar(32)        | NO   |     | NULL    |                |

DESCRIBE ipblocks;</tt> +++--+-+-++ +++--+-+-++ +++--+-+-++
 * Field             | Type               | Null | Key | Default | Extra          |
 * ipb_id            | int(8)             | NO   | PRI | NULL    | AUTO_INCREMENT |
 * ipb_address       | varchar(40) binary | NO   | MUL | NULL    |                |
 * ipb_user          | int(8) unsigned    | NO   | MUL | 0       |                |
 * ipb_by            | int(8) unsigned    | NO   |     | 0       |                |
 * ipb_reason        | tinyblob           | NO   |     | NULL    |                |
 * ipb_timestamp     | char(14) binary    | NO   |     | NULL    |                |
 * ipb_auto          | tinyint(1)         | NO   |     | 0       |                |
 * ipb_expiry        | char(14) binary    | NO   |     | NULL    |                |

DESCRIBE ipblocks;</tt> +++--+-+-++ +++--+-+-++ +++--+-+-++
 * Field             | Type               | Null | Key | Default | Extra          |
 * ipb_id            | int(8)             | NO   | PRI | NULL    | AUTO_INCREMENT |
 * ipb_address       | varchar(40) binary | NO   | MUL | NULL    |                |
 * ipb_user          | int(8) unsigned    | NO   | MUL | 0       |                |
 * ipb_by            | int(8) unsigned    | NO   |     | 0       |                |
 * ipb_reason        | tinyblob           | NO   |     | NULL    |                |
 * ipb_timestamp     | char(14) binary    | NO   |     | NULL    |                |
 * ipb_auto          | tinyint(1)         | NO   |     | 0       |                |