Příručka:Databázová tabulka image
↑ Manuál:Obsah | MediaWiki schéma databáze | Tabulka image |
Tabulka image popisuje obrázky a další nahrané soubory.
Stránky s popisem obrázků jsou však uloženy jako jiné stránky.
Viz také: Správa obrázků.
Mnoho polí v této tabulce je analogických polím v tabulce oldimage .
Některé z těchto informací byly upraveny z schema.doc
v adresáři MediaWiki docs/
.
Cesta ke skutečnému obrázku není v této tabulce uložena: viz $wgHashedUploadDirectory .
Pole
img_name
U názvů souborů se používají podtržítka.
img_size
Velikost souboru v bajtech.
img_width
Verze MediaWiki: | ≥ 1.5 |
Šířka obrázku, v pixelech.
img_height
Verze MediaWiki: | ≥ 1.5 |
Výška obrázku, v pixelech.
img_metadata
Verze MediaWiki: | ≥ 1.5 |
Vlastnosti serializovaného souboru, jako serializace pole PHP nebo jako JSON.
Pole json může obsahovat adresu v tabulce text
nebo externím úložišti.
0
, -1
nebo prázdné, pokud extraktor selže.
T155741
img_bits
Verze MediaWiki: | ≥ 1.5 |
Bitová hloubka obrázků založených na paletě GIF/PNG (až 8 bitů). Obrázky bez palety (JPEG/PNG/TIFF/SVG) mají hodnotu 0, 8 nebo 16. Všechny ostatní soubory mají výchozí hodnotu 0.
img_media_type
Verze MediaWiki: | ≥ 1.5 |
Možnosti jsou: UNKNOWN, BITMAP, DRAWING, AUDIO, VIDEO, MULTIMEDIA, OFFICE, TEXT, EXECUTABLE, ARCHIVE, 3D
img_major_mime
Verze MediaWiki: | ≥ 1.5 |
Možnosti jsou: unknown, application, audio, chemical, image, message, model, multipart, text, video
img_minor_mime
Verze MediaWiki: | ≥ 1.5 |
Například jpeg, gif, png, svg+xml, tiff, ogg, pdf vnd.djvu, webm, wav, mpeg, x-flac, midi, x-xcf, sla, webp, etc.
img_description
Verze MediaWiki: | ≤ 1.32 |
Pole popisu zadané během nahrávání. Není to popisná stránka (související File: stránka wiki), ale "souhrn" poskytnutý uživatelem v případě opětovného nahrání.
(zastaralé); Místo toho by měl být použit imgcomment_description_id tabulky image_comment_temp
a tabulka comment
!
img_description_id
Verze MediaWiki: | ≥ 1.30 |
Toto je cizí klíč k comment_id v tabulce comment .
img_user
Verze MediaWiki: | ≤ 1.33 |
ID uživatele, který soubor nahrál.
(zastaralé od 1.31)
Během provádění Migrace zúčastněných a v závislosti na konfiguračním nastavení $wgActorTableSchemaMigrationStage
může být toto pole prázdné a aktér provádějící úpravy může být místo toho uložen do pole img_actor.
img_user_text
Verze MediaWiki: | ≤ 1.33 |
Jméno uživatele, který nahrál soubor.
(zastaralé od 1.31)
Během provádění Migrace zúčastněných a v závislosti na konfiguračním nastavení $wgActorTableSchemaMigrationStage
může být toto pole prázdné a aktér provádějící úpravy může být místo toho uložen do pole img_actor.
img_actor
Verze MediaWiki: | ≥ 1.31 |
Toto je cizí klíč k actor_id v tabulce actor a určuje aktéra, který nahrál nejnovější verzi obrázku.
img_timestamp
Časové razítko, kdy došlo k nahrání. Není nutně stejné časové razítko jako logging.log_timestamp.
S výjimkou revizí obrázků importovaných z jiné wiki časové razítko jednoznačně identifikuje revizi souboru. Pokud proběhnou dvě nahrání stejného souboru ve stejnou sekundu, druhé nahrání se zdrží, dokud nedostane jiné časové razítko.
img_sha1
Verze MediaWiki: | ≥ 1.11 |
SHA-1 hash obsahu souboru ve formátu základního 36. Wikimedia\base_convert()
se používá k převodu ze základu 16 (hexadecimální) na základ 36 a pak k doplnění výsledku na 31 znaků.
img_type
Verze MediaWiki: | ≤ 1.4 |
Přehled změn ve schématu tabulky
Verze MediaWiki: | ≥ 1.41 |
DESCRIBE image;
+--------------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | img_name | varbinary(255) | NO | PRI | | | | img_size | bigint(20) unsigned | NO | MUL | 0 | | | img_width | int(11) | NO | | 0 | | | img_height | int(11) | NO | | 0 | | | img_metadata | mediumblob | NO | | NULL | | | img_bits | int(11) | NO | | 0 | | | img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE','3D') | YES | MUL | NULL | | | img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart','chemical') | NO | | unknown | | | img_minor_mime | varbinary(100) | NO | | unknown | | | img_description_id | bigint(20) unsigned | NO | | NULL | | | img_actor | bigint(20) unsigned | NO | MUL | NULL | | | img_timestamp | binary(14) | NO | MUL | NULL | | | img_sha1 | varbinary(32) | NO | MUL | | | +--------------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+
Verze MediaWiki: | 1.36 – 1.40 |
DESCRIBE image;
+--------------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | img_name | varbinary(255) | NO | PRI | | | | img_size | int(10) unsigned | NO | MUL | 0 | | | img_width | int(11) | NO | | 0 | | | img_height | int(11) | NO | | 0 | | | img_metadata | mediumblob | NO | | NULL | | | img_bits | int(11) | NO | | 0 | | | img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE','3D') | YES | MUL | NULL | | | img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart','chemical') | NO | | unknown | | | img_minor_mime | varbinary(100) | NO | | unknown | | | img_description_id | bigint(20) unsigned | NO | | NULL | | | img_actor | bigint(20) unsigned | NO | MUL | NULL | | | img_timestamp | binary(14) | NO | MUL | NULL | | | img_sha1 | varbinary(32) | NO | MUL | | | +--------------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+
Verze MediaWiki: | 1.34 – 1.35 |
DESCRIBE image;
+--------------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | img_name | varbinary(255) | NO | PRI | | | | img_size | int(10) unsigned | NO | MUL | 0 | | | img_width | int(11) | NO | | 0 | | | img_height | int(11) | NO | | 0 | | | img_metadata | mediumblob | NO | | NULL | | | img_bits | int(11) | NO | | 0 | | | img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE','3D') | YES | MUL | NULL | | | img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart','chemical') | NO | | unknown | | | img_minor_mime | varbinary(100) | NO | | unknown | | | img_description_id | bigint(20) unsigned | NO | | NULL | | | img_actor | bigint(20) unsigned | NO | MUL | NULL | | | img_timestamp | varbinary(14) | NO | MUL | | | | img_sha1 | varbinary(32) | NO | MUL | | | +--------------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+
Verze MediaWiki: | 1.33 |
DESCRIBE image;
+--------------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | img_name | varbinary(255) | NO | PRI | | | | img_size | int(10) unsigned | NO | MUL | 0 | | | img_width | int(11) | NO | | 0 | | | img_height | int(11) | NO | | 0 | | | img_metadata | mediumblob | NO | | NULL | | | img_bits | int(11) | NO | | 0 | | | img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE','3D') | YES | MUL | NULL | | | img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart','chemical') | NO | | unknown | | | img_minor_mime | varbinary(100) | NO | | unknown | | | img_description_id | bigint(20) unsigned | NO | | NULL | | | img_user | int(10) unsigned | NO | MUL | 0 | | | img_user_text | varbinary(255) | NO | MUL | | | | img_actor | bigint(20) unsigned | NO | MUL | 0 | | | img_timestamp | varbinary(14) | NO | MUL | | | | img_sha1 | varbinary(32) | NO | MUL | | | +--------------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+
Verze MediaWiki: | 1.31 – 1.32 |
DESCRIBE image;
+--------------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | img_name | varbinary(255) | NO | PRI | | | | img_size | int(10) unsigned | NO | MUL | 0 | | | img_width | int(11) | NO | | 0 | | | img_height | int(11) | NO | | 0 | | | img_metadata | mediumblob | NO | | NULL | | | img_bits | int(11) | NO | | 0 | | | img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE','3D') | YES | MUL | NULL | | | img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart','chemical') | NO | | unknown | | | img_minor_mime | varbinary(100) | NO | | unknown | | | img_description | varbinary(767) | NO | | | | | img_description_id | bigint(20) unsigned | NO | | 0 | | | img_user | int(10) unsigned | NO | MUL | 0 | | | img_user_text | varbinary(255) | NO | MUL | | | | img_actor | bigint(20) unsigned | NO | MUL | 0 | | | img_timestamp | varbinary(14) | NO | MUL | | | | img_sha1 | varbinary(32) | NO | MUL | | | +--------------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+
Verze MediaWiki: | 1.30 |
DESCRIBE image;
+-----------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | img_name | varbinary(255) | NO | PRI | | | | img_size | int(10) unsigned | NO | MUL | 0 | | | img_width | int(11) | NO | | 0 | | | img_height | int(11) | NO | | 0 | | | img_metadata | mediumblob | NO | | NULL | | | img_bits | int(11) | NO | | 0 | | | img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE','3D') | YES | MUL | NULL | | | img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart','chemical') | NO | | unknown | | | img_minor_mime | varbinary(100) | NO | | unknown | | | img_description | varbinary(767) | NO | | | | | img_user | int(10) unsigned | NO | MUL | 0 | | | img_user_text | varbinary(255) | NO | MUL | NULL | | | img_timestamp | varbinary(14) | NO | MUL | | | | img_sha1 | varbinary(32) | NO | MUL | | | +-----------------+-------------------------------------------------------------------------------------------------------------+------+-----+---------+-------+
Verze MediaWiki: | 1.25 – 1.29 |
DESCRIBE image;
+-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | img_name | varbinary(255) | NO | PRI | | | | img_size | int(10) unsigned | NO | MUL | 0 | | | img_width | int(11) | NO | | 0 | | | img_height | int(11) | NO | | 0 | | | img_metadata | mediumblob | NO | | NULL | | | img_bits | int(11) | NO | | 0 | | | img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES | MUL | NULL | | | img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart','chemical') | NO | | unknown | | | img_minor_mime | varbinary(100) | NO | | unknown | | | img_description | varbinary(767) | NO | | NULL | | | img_user | int(10) unsigned | NO | MUL | 0 | | | img_user_text | varbinary(255) | NO | MUL | NULL | | | img_timestamp | varbinary(14) | NO | MUL | | | | img_sha1 | varbinary(32) | NO | MUL | | | +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+
Verze MediaWiki: | 1.24 |
DESCRIBE image;
+-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | img_name | varbinary(255) | NO | PRI | NULL | | | img_size | int(8) unsigned | NO | MUL | 0 | | | img_width | int(5) | NO | | 0 | | | img_height | int(5) | NO | | 0 | | | img_metadata | mediumblob | NO | | NULL | | | img_bits | int(3) | NO | | 0 | | | img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES | | NULL | | | img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart','chemical') | NO | | unknown | | | img_minor_mime | varbinary(100) | NO | | unknown | | | img_description | tinyblob | NO | | NULL | | | img_user | int(5) unsigned | NO | | 0 | | | img_user_text | varchar(255) binary | NO | | NULL | | | img_timestamp | varbinary(14) | NO | MUL | NULL | | | img_sha1 | varbinary(32) | NO | | NULL | | +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+
Verze MediaWiki: | 1.16 – 1.23 |
DESCRIBE image;
+-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | img_name | varbinary(255) | NO | PRI | NULL | | | img_size | int(8) unsigned | NO | MUL | 0 | | | img_width | int(5) | NO | | 0 | | | img_height | int(5) | NO | | 0 | | | img_metadata | mediumblob | NO | | NULL | | | img_bits | int(3) | NO | | 0 | | | img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES | | NULL | | | img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart') | NO | | unknown | | | img_minor_mime | varbinary(100) | NO | | unknown | | | img_description | tinyblob | NO | | NULL | | | img_user | int(5) unsigned | NO | | 0 | | | img_user_text | varchar(255) binary | NO | | NULL | | | img_timestamp | varbinary(14) | NO | MUL | NULL | | | img_sha1 | varbinary(32) | NO | | NULL | | +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+
Verze MediaWiki: | 1.11 – 1.15 |
DESCRIBE image;
+-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | img_name | varbinary(255) | NO | PRI | NULL | | | img_size | int(8) unsigned | NO | MUL | 0 | | | img_width | int(5) | NO | | 0 | | | img_height | int(5) | NO | | 0 | | | img_metadata | mediumblob | NO | | NULL | | | img_bits | int(3) | NO | | 0 | | | img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES | | NULL | | | img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart') | NO | | unknown | | | img_minor_mime | varbinary(32) | NO | | unknown | | | img_description | tinyblob | NO | | NULL | | | img_user | int(5) unsigned | NO | | 0 | | | img_user_text | varchar(255) binary | NO | | NULL | | | img_timestamp | varbinary(14) | NO | MUL | NULL | | | img_sha1 | varbinary(32) | NO | | NULL | | +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+
Verze MediaWiki: | 1.10 |
DESCRIBE image;
+-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | img_name | varbinary(255) | NO | PRI | NULL | | | img_size | int(8) unsigned | NO | MUL | 0 | | | img_width | int(5) | NO | | 0 | | | img_height | int(5) | NO | | 0 | | | img_metadata | mediumblob | NO | | NULL | | | img_bits | int(3) | NO | | 0 | | | img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES | | NULL | | | img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart') | NO | | unknown | | | img_minor_mime | varbinary(32) | NO | | unknown | | | img_description | tinyblob | NO | | NULL | | | img_user | int(5) unsigned | NO | | 0 | | | img_user_text | varchar(255) binary | NO | | NULL | | | img_timestamp | varbinary(14) | NO | MUL | NULL | | +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+
Verze MediaWiki: | 1.5 – 1.9 |
DESCRIBE image;
+-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+ | img_name | varchar(255) binary | NO | PRI | NULL | | | img_size | int(8) unsigned | NO | MUL | 0 | | | img_width | int(5) | NO | | 0 | | | img_height | int(5) | NO | | 0 | | | img_metadata | mediumblob | NO | | NULL | | | img_bits | int(3) | NO | | 0 | | | img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES | | NULL | | | img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart') | NO | | unknown | | | img_minor_mime | varchar(32) binary | NO | | unknown | | | img_description | tinyblob | NO | | NULL | | | img_user | int(5) unsigned | NO | | 0 | | | img_user_text | varchar(255) binary | NO | | NULL | | | img_timestamp | char(14) binary | NO | MUL | NULL | | +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+-------+
Verze MediaWiki: | 1.1 – 1.4 |
DESCRIBE image;
+-----------------+---------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------+---------------------+------+-----+---------+-------+ | img_name | varchar(255) binary | NO | MUL | NULL | | | img_size | int(8) unsigned | NO | MUL | 0 | | | img_description | tinyblob | NO | | NULL | | | img_user | int(5) unsigned | NO | | 0 | | | img_user_text | varchar(255) binary | NO | | NULL | | | img_timestamp | char(14) binary | NO | MUL | NULL | | +-----------------+---------------------+------+-----+---------+-------+
Indexy
Verze MediaWiki: | ≥ 1.34 |
SHOW INDEX IN image;
+-------+------------+---------------------+--------------+----------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | +-------+------------+---------------------+--------------+----------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | image | 0 | PRIMARY | 1 | img_name | A | 0 | NULL | NULL | | BTREE | | | | image | 1 | img_actor_timestamp | 1 | img_actor | A | 0 | NULL | NULL | | BTREE | | | | image | 1 | img_actor_timestamp | 2 | img_timestamp | A | 0 | NULL | NULL | | BTREE | | | | image | 1 | img_size | 1 | img_size | A | 0 | NULL | NULL | | BTREE | | | | image | 1 | img_timestamp | 1 | img_timestamp | A | 0 | NULL | NULL | | BTREE | | | | image | 1 | img_sha1 | 1 | img_sha1 | A | 0 | 10 | NULL | | BTREE | | | | image | 1 | img_media_mime | 1 | img_media_type | A | 0 | NULL | NULL | YES | BTREE | | | | image | 1 | img_media_mime | 2 | img_major_mime | A | 0 | NULL | NULL | | BTREE | | | | image | 1 | img_media_mime | 3 | img_minor_mime | A | 0 | NULL | NULL | | BTREE | | | +-------+------------+---------------------+--------------+----------------+-----------+-------------+----------+--------+------+------------+---------+---------------+