Jump to content

Manual: Tabela Block

From mediawiki.org
This page is a translated version of the page Manual:Block table and the translation is 43% complete.
Versão MediaWiki:
1.42
Gerrit change 973442

A tabela block guarda os detalhes sobre as ações de bloqueio de contas e endereços de IP. A tabela block e block_target substituíram a tabela ipblocks antiga.

Campos

bl_id

Chave primária.

bl_target

O destino de bloquear. A chave externa para block_target.bt_id.

bl_by_actor

Actor who made the block.

bl_reason_id

A chave externa para comment.comment_id. Comentário de texto criado pelo bloqueador.

bl_timestamp

Data de criação (ou atualização) no formato padrão de YMDHMS. Os bloqueios de IP expiram automaticamente.

bl_anon_only

If set to 1, block applies only to logged-out users and temporary users.

bl_create_account

Block prevents account creation from matching IP addresses

bl_enable_autoblock

Block triggers autoblocks

bl_expiry

Time at which the block will expire. May be "infinity"

bl_deleted

One of the following values:

  • 0 – the block is not hidden.
  • 1 – this block causes the username and block to be hidden, and the expiry must be infinite.
    • This is denormalized into rev_deleted and the other deleted bitfields.
  • 2 – this just hides the block and leaves the username unhidden elsewhere. This value is only possible in MediaWiki 1.46 and after.

bl_block_email

Block prevents user from accessing Special:Emailuser

bl_allow_usertalk

Block allows user to edit their own talk page

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

bl_sitewide

Block user from editing any page on the site (other than their own user talk page).

Resumo de esquema

Versão MediaWiki:
1.42

DESCRIBE block;

+---------------------+---------------------+------+-----+---------+----------------+
| Field               | Type                | Null | Key | Default | Extra          |
+---------------------+---------------------+------+-----+---------+----------------+
| bl_id               | int(10) unsigned    | NO   | PRI | NULL    | auto_increment |
| bl_target           | int(10) unsigned    | NO   | MUL | NULL    |                |
| bl_by_actor         | bigint(20) unsigned | NO   |     | NULL    |                |
| bl_reason_id        | bigint(20) unsigned | NO   |     | NULL    |                |
| bl_timestamp        | binary(14)          | NO   | MUL | NULL    |                |
| bl_anon_only        | tinyint(1)          | NO   |     | 0       |                |
| bl_create_account   | tinyint(1)          | NO   |     | 1       |                |
| bl_enable_autoblock | tinyint(1)          | NO   |     | 1       |                |
| bl_expiry           | varbinary(14)       | NO   | MUL | NULL    |                |
| bl_deleted          | tinyint(1)          | NO   |     | 0       |                |
| bl_block_email      | tinyint(1)          | NO   |     | 0       |                |
| bl_allow_usertalk   | tinyint(1)          | NO   |     | 0       |                |
| bl_parent_block_id  | int(10) unsigned    | YES  | MUL | NULL    |                |
| bl_sitewide         | tinyint(1)          | NO   |     | 1       |                |
+---------------------+---------------------+------+-----+---------+----------------+

Índices

Versão MediaWiki:
1.42

SHOW INDEX IN block;

+-------+------------+--------------------+--------------+--------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name           | Seq_in_index | Column_name        | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+-------+------------+--------------------+--------------+--------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| block |          0 | PRIMARY            |            1 | bl_id              | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| block |          1 | bl_timestamp       |            1 | bl_timestamp       | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| block |          1 | bl_target          |            1 | bl_target          | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| block |          1 | bl_expiry          |            1 | bl_expiry          | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| block |          1 | bl_parent_block_id |            1 | bl_parent_block_id | A         |           0 |     NULL | NULL   | YES  | BTREE      |         |               |
+-------+------------+--------------------+--------------+--------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+