Příručka:Databázová tabulka uploadstash

This page is a translated version of the page Manual:Uploadstash table and the translation is 100% complete.
Manuál:Obsah MediaWiki schéma databáze Tabulka uploadstash
Verze MediaWiki:
1.18

Tabulka uploadstash ukládá informace o nově nahraných souborech před jejich přesunem do skutečného úložiště souborů, viz také Manual:UploadStash . Obsahuje informace o nekompletních nahráváních. Tyto mohou např. stane, když uživatel opustil stránku pro nahrávání před dokončením nahrávání. Skript údržby cleanupUploadStash.php lze použít k odstranění osamocených položek z této tabulky.

Pole

us_id

Primární klíč.

us_user

Uživatel, který nahrál soubor.

us_key

Klíč souboru. Takto aplikace skutečně vyhledávají soubor. Může zmizet nebo se stát primárním klíčem.

us_orig_path

Původní cesta.

us_path

Dočasná cesta, na které je soubor skutečně uložen.

us_source_type

Z jakého typu nahrání soubor pochází (někdy). Například "url"

us_timestamp

Datum/čas, kdy byl soubor přidán

us_status

Například "finished"

us_chunk_inx

Verze MediaWiki:
1.19

Počítadlo bloků začíná na 0, aktuální offset je uložen v us_size

us_props

Verze MediaWiki:
1.21

Vlastnosti serializovaného souboru z File::getPropsFromPath

us_size

Vlastnosti souboru z File::getPropsFromPath. Mohou se ukázat jako zbytečné.

us_sha1

Tento hash pochází z File::sha1Base36() a má 31 znaků

us_mime

Kombinace $dur a img_minor_mime . Například, image/png

us_media_type

Typ média definovaný konstantami MEDIATYPE_xxx by měl duplikovat definici v tabulce image.

us_image_width

Vlastnost specifická pro obrázek.

us_image_height

Vlastnost specifická pro obrázek.

us_image_bits

Vlastnost specifická pro obrázek.

Přehled změn ve schématu tabulky

Verze MediaWiki:
1.41

DESCRIBE uploadstash;

+-----------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
| Field           | Type                                                                                                        | Null | Key | Default | Extra          |
+-----------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
| us_id           | int(10) unsigned                                                                                            | NO   | PRI | NULL    | auto_increment |
| us_user         | int(10) unsigned                                                                                            | NO   | MUL | NULL    |                |
| us_key          | varbinary(255)                                                                                              | NO   | UNI | NULL    |                |
| us_orig_path    | varbinary(255)                                                                                              | NO   |     | NULL    |                |
| us_path         | varbinary(255)                                                                                              | NO   |     | NULL    |                |
| us_source_type  | varbinary(50)                                                                                               | YES  |     | NULL    |                |
| us_timestamp    | binary(14)                                                                                                  | NO   | MUL | NULL    |                |
| us_status       | varbinary(50)                                                                                               | NO   |     | NULL    |                |
| us_chunk_inx    | int(10) unsigned                                                                                            | YES  |     | NULL    |                |
| us_props        | blob                                                                                                        | YES  |     | NULL    |                |
| us_size         | bigint(20) unsigned                                                                                         | NO   |     | NULL    |                |
| us_sha1         | varbinary(31)                                                                                               | NO   |     | NULL    |                |
| us_mime         | varbinary(255)                                                                                              | YES  |     | NULL    |                |
| us_media_type   | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE','3D') | YES  |     | NULL    |                |
| us_image_width  | int(10) unsigned                                                                                            | YES  |     | NULL    |                |
| us_image_height | int(10) unsigned                                                                                            | YES  |     | NULL    |                |
| us_image_bits   | smallint(5) unsigned                                                                                        | YES  |     | NULL    |                |
+-----------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
Verze MediaWiki:
1.36 – 1.40

DESCRIBE uploadstash;

+-----------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
| Field           | Type                                                                                                        | Null | Key | Default | Extra          |
+-----------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
| us_id           | int(10) unsigned                                                                                            | NO   | PRI | NULL    | auto_increment |
| us_user         | int(10) unsigned                                                                                            | NO   | MUL | NULL    |                |
| us_key          | varbinary(255)                                                                                              | NO   | UNI | NULL    |                |
| us_orig_path    | varbinary(255)                                                                                              | NO   |     | NULL    |                |
| us_path         | varbinary(255)                                                                                              | NO   |     | NULL    |                |
| us_source_type  | varbinary(50)                                                                                               | YES  |     | NULL    |                |
| us_timestamp    | binary(14)                                                                                                  | NO   | MUL | NULL    |                |
| us_status       | varbinary(50)                                                                                               | NO   |     | NULL    |                |
| us_chunk_inx    | int(10) unsigned                                                                                            | YES  |     | NULL    |                |
| us_props        | blob                                                                                                        | YES  |     | NULL    |                |
| us_size         | int(10) unsigned                                                                                            | NO   |     | NULL    |                |
| us_sha1         | varbinary(31)                                                                                               | NO   |     | NULL    |                |
| us_mime         | varbinary(255)                                                                                              | YES  |     | NULL    |                |
| us_media_type   | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE','3D') | YES  |     | NULL    |                |
| us_image_width  | int(10) unsigned                                                                                            | YES  |     | NULL    |                |
| us_image_height | int(10) unsigned                                                                                            | YES  |     | NULL    |                |
| us_image_bits   | smallint(5) unsigned                                                                                        | YES  |     | NULL    |                |
+-----------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
Verze MediaWiki:
1.30 – 1.35

DESCRIBE uploadstash;

+-----------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
| Field           | Type                                                                                                        | Null | Key | Default | Extra          |
+-----------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
| us_id           | int(10) unsigned                                                                                            | NO   | PRI | NULL    | auto_increment |
| us_user         | int(10) unsigned                                                                                            | NO   | MUL | NULL    |                |
| us_key          | varbinary(255)                                                                                              | NO   | UNI | NULL    |                |
| us_orig_path    | varbinary(255)                                                                                              | NO   |     | NULL    |                |
| us_path         | varbinary(255)                                                                                              | NO   |     | NULL    |                |
| us_source_type  | varbinary(50)                                                                                               | YES  |     | NULL    |                |
| us_timestamp    | varbinary(14)                                                                                               | NO   | MUL | NULL    |                |
| us_status       | varbinary(50)                                                                                               | NO   |     | NULL    |                |
| us_chunk_inx    | int(10) unsigned                                                                                            | YES  |     | NULL    |                |
| us_props        | blob                                                                                                        | YES  |     | NULL    |                |
| us_size         | int(10) unsigned                                                                                            | NO   |     | NULL    |                |
| us_sha1         | varbinary(31)                                                                                               | NO   |     | NULL    |                |
| us_mime         | varbinary(255)                                                                                              | YES  |     | NULL    |                |
| us_media_type   | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE','3D') | YES  |     | NULL    |                |
| us_image_width  | int(10) unsigned                                                                                            | YES  |     | NULL    |                |
| us_image_height | int(10) unsigned                                                                                            | YES  |     | NULL    |                |
| us_image_bits   | smallint(5) unsigned                                                                                        | YES  |     | NULL    |                |
+-----------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
Verze MediaWiki:
1.21 – 1.29

DESCRIBE uploadstash;

+-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
| Field           | Type                                                                                                   | Null | Key | Default | Extra          |
+-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
| us_id           | int(10) unsigned                                                                                       | NO   | PRI | NULL    | auto_increment |
| us_user         | int(10) unsigned                                                                                       | NO   | MUL | NULL    |                |
| us_key          | varbinary(255)                                                                                         | NO   | UNI | NULL    |                |
| us_orig_path    | varbinary(255)                                                                                         | NO   |     | NULL    |                |
| us_path         | varbinary(255)                                                                                         | NO   |     | NULL    |                |
| us_source_type  | varbinary(50)                                                                                          | YES  |     | NULL    |                |
| us_timestamp    | varbinary(14)                                                                                          | NO   | MUL | NULL    |                |
| us_status       | varbinary(50)                                                                                          | NO   |     | NULL    |                |
| us_chunk_inx    | int(10) unsigned                                                                                       | YES  |     | NULL    |                |
| us_props        | blob                                                                                                   | YES  |     | NULL    |                |
| us_size         | int(10) unsigned                                                                                       | NO   |     | NULL    |                |
| us_sha1         | varbinary(31)                                                                                          | NO   |     | NULL    |                |
| us_mime         | varbinary(255)                                                                                         | YES  |     | NULL    |                |
| us_media_type   | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES  |     | NULL    |                |
| us_image_width  | int(10) unsigned                                                                                       | YES  |     | NULL    |                |
| us_image_height | int(10) unsigned                                                                                       | YES  |     | NULL    |                |
| us_image_bits   | smallint(5) unsigned                                                                                   | YES  |     | NULL    |                |
+-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
Verze MediaWiki:
1.19 – 1.20

DESCRIBE uploadstash;

+-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
| Field           | Type                                                                                                   | Null | Key | Default | Extra          |
+-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
| us_id           | int(10) unsigned                                                                                       | NO   | PRI | NULL    | auto_increment |
| us_user         | int(10) unsigned                                                                                       | NO   | MUL | NULL    |                |
| us_key          | varbinary(255)                                                                                         | NO   | UNI | NULL    |                |
| us_orig_path    | varbinary(255)                                                                                         | NO   |     | NULL    |                |
| us_path         | varbinary(255)                                                                                         | NO   |     | NULL    |                |
| us_source_type  | varbinary(50)                                                                                          | YES  |     | NULL    |                |
| us_timestamp    | varbinary(14)                                                                                          | NO   | MUL | NULL    |                |
| us_status       | varbinary(50)                                                                                          | NO   |     | NULL    |                |
| us_chunk_inx    | int(10) unsigned                                                                                       | YES  |     | NULL    |                |
| us_size         | int(10) unsigned                                                                                       | NO   |     | NULL    |                |
| us_sha1         | varbinary(31)                                                                                          | NO   |     | NULL    |                |
| us_mime         | varbinary(255)                                                                                         | YES  |     | NULL    |                |
| us_media_type   | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES  |     | NULL    |                |
| us_image_width  | int(10) unsigned                                                                                       | YES  |     | NULL    |                |
| us_image_height | int(10) unsigned                                                                                       | YES  |     | NULL    |                |
| us_image_bits   | smallint(5) unsigned                                                                                   | YES  |     | NULL    |                |
+-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
Verze MediaWiki:
1.18

DESCRIBE uploadstash;

+-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
| Field           | Type                                                                                                   | Null | Key | Default | Extra          |
+-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+
| us_id           | int(10) unsigned                                                                                       | NO   | PRI | NULL    | auto_increment |
| us_user         | int(10) unsigned                                                                                       | NO   | MUL | NULL    |                |
| us_key          | varbinary(255)                                                                                         | NO   | UNI | NULL    |                |
| us_orig_path    | varbinary(255)                                                                                         | NO   |     | NULL    |                |
| us_path         | varbinary(255)                                                                                         | NO   |     | NULL    |                |
| us_source_type  | varbinary(50)                                                                                          | YES  |     | NULL    |                |
| us_timestamp    | varbinary(14)                                                                                          | NO   | MUL | NULL    |                |
| us_status       | varbinary(50)                                                                                          | NO   |     | NULL    |                |
| us_size         | int(10) unsigned                                                                                       | NO   |     | NULL    |                |
| us_sha1         | varbinary(31)                                                                                          | NO   |     | NULL    |                |
| us_mime         | varbinary(255)                                                                                         | YES  |     | NULL    |                |
| us_media_type   | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES  |     | NULL    |                |
| us_image_width  | int(10) unsigned                                                                                       | YES  |     | NULL    |                |
| us_image_height | int(10) unsigned                                                                                       | YES  |     | NULL    |                |
| us_image_bits   | smallint(5) unsigned                                                                                   | YES  |     | NULL    |                |
+-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+

Indexy

Verze MediaWiki:
1.18

SHOW INDEX IN uploadstash;

+-------------+------------+--------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table       | Non_unique | Key_name     | Seq_in_index | Column_name  | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+-------------+------------+--------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| uploadstash |          0 | PRIMARY      |            1 | us_id        | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| uploadstash |          0 | us_key       |            1 | us_key       | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| uploadstash |          1 | us_user      |            1 | us_user      | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| uploadstash |          1 | us_timestamp |            1 | us_timestamp | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
+-------------+------------+--------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+