files table

Fields

Schema summary

 DESCRIBE file;

+------------------+---------------------+------+-----+---------+----------------+
| Field            | Type                | Null | Key | Default | Extra          |
+------------------+---------------------+------+-----+---------+----------------+
| file_id          | int(10) unsigned    | NO   | PRI | NULL    | auto_increment |
| page_id          | int(10) unsigned    | NO   | MUL | 0       |                |
| user_id          | int(10) unsigned    | NO   | MUL | 0       |                |
| file_name        | varchar(250)        | NO   |     | NULL    |                |
| file_lang        | varchar(2)          | NO   |     | NULL    |                |
| file_description | varchar(250)        | NO   |     | NULL    |                |
| caption          | text                | NO   |     | NULL    |                |
| author           | varchar(250)        | NO   |     | NULL    |                |
| source           | varchar(250)        | NO   |     | NULL    |                |
| source_url       | varchar(255)        | NO   |     | NULL    |                |
| license_id       | int(10) unsigned    | NO   |     | 0       |                |
| uploaded_dt      | datetime            | YES  |     | NULL    |                |
| modified_dt      | datetime            | YES  |     | NULL    |                |
| file_size        | int(10) unsigned    | NO   |     | 0       |                |
| picture_w        | int(10) unsigned    | NO   |     | 0       |                |
| picture_h        | int(10) unsigned    | NO   |     | 0       |                |
| file_ext         | varchar(10)         | NO   |     | NULL    |                |
| mime_type        | varchar(255)        | NO   |     | NULL    |                |
| hits             | int(10) unsigned    | NO   |     | 0       |                |
| deleted          | tinyint(1) unsigned | YES  | MUL | 0       |                |
+------------------+---------------------+------+-----+---------+----------------+

Indices

 SHOW INDEX IN file;

+----------+------------+---------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table    | Non_unique | Key_name      | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+----------+------------+---------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| dev_file |          0 | PRIMARY       |            1 | file_id     | A         |          27 |     NULL | NULL   |      | BTREE      |         |               |
| dev_file |          0 | idx_page_id   |            1 | page_id     | A         |          13 |     NULL | NULL   |      | BTREE      |         |               |
| dev_file |          0 | idx_page_id   |            2 | file_name   | A         |          27 |     NULL | NULL   |      | BTREE      |         |               |
| dev_file |          1 | idx_page_id_2 |            1 | page_id     | A         |          13 |     NULL | NULL   |      | BTREE      |         |               |
| dev_file |          1 | idx_page_id_2 |            2 | uploaded_dt | A         |          27 |     NULL | NULL   | YES  | BTREE      |         |               |
| dev_file |          1 | idx_deleted   |            1 | deleted     | A         |           2 |     NULL | NULL   | YES  | BTREE      |         |               |
| dev_file |          1 | idx_user_id   |            1 | user_id     | A         |           2 |     NULL | NULL   |      | BTREE      |         |               |
+----------+------------+---------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+