Toolserver:Database schema/Images and media

Image
+-++--+-+-+---+ +-++--+-+-+---+ +-++--+-+-+---+
 * Field          | Type                                                                                                   | Null | Key | Default | Extra |
 * img_name       | varchar(255)                                                                                           | NO   |     |         |       |
 * img_size       | int(8) unsigned                                                                                        | NO   |     | 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)                                                                                            | NO   |     | unknown |       |
 * img_description | tinyblob                                                                                              | NO   |     | NULL    |       |
 * img_user       | int(5) unsigned                                                                                        | NO   |     | 0       |       |
 * img_user_text  | varchar(255)                                                                                           | NO   |     |         |       |
 * img_timestamp  | varchar(14)                                                                                            | NO   |     |         |       |
 * img_sha1       | varchar(32)                                                                                            | NO   |     |         |       |

Filearchive
+--++--+-+-+---+ +--++--+-+-+---+ +--++--+-+-+---+
 * Field               | Type                                                                                                   | Null | Key | Default | Extra |
 * fa_id               | int(11)                                                                                                | NO   |     | 0       |       |
 * fa_name             | varchar(255)                                                                                           | NO   |     |         |       |
 * fa_archive_name     | varchar(255)                                                                                           | YES  |     |         |       |
 * fa_storage_group    | varchar(16)                                                                                            | YES  |     | NULL    |       |
 * fa_storage_key      | varchar(64)                                                                                            | YES  |     |         |       |
 * fa_deleted_user     | int(11)                                                                                                | YES  |     | NULL    |       |
 * fa_deleted_timestamp | varchar(14)                                                                                           | YES  |     |         |       |
 * fa_deleted_reason   | text                                                                                                   | YES  |     | NULL    |       |
 * fa_size             | int(8) unsigned                                                                                        | YES  |     | 0       |       |
 * fa_width            | int(5)                                                                                                 | YES  |     | 0       |       |
 * fa_height           | int(5)                                                                                                 | YES  |     | 0       |       |
 * fa_metadata         | mediumblob                                                                                             | YES  |     | NULL    |       |
 * fa_bits             | int(3)                                                                                                 | YES  |     | 0       |       |
 * fa_media_type       | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES  |     | NULL    |       |
 * fa_major_mime       | enum('unknown','application','audio','image','text','video','message','model','multipart')             | YES  |     | unknown |       |
 * fa_minor_mime       | varchar(32)                                                                                            | YES  |     | unknown |       |
 * fa_user             | int(5) unsigned                                                                                        | YES  |     | 0       |       |
 * fa_user_text        | varchar(255)                                                                                           | YES  |     |         |       |
 * fa_timestamp        | varchar(14)                                                                                            | YES  |     |         |       |
 * fa_deleted          | tinyint(1) unsigned                                                                                    | NO   |     | 0       |       |

Oldimage
+-++--+-+-+---+ +-++--+-+-+---+ +-++--+-+-+---+
 * Field          | Type                                                                                                   | Null | Key | Default | Extra |
 * oi_name        | varchar(255)                                                                                           | NO   |     |         |       |
 * oi_archive_name | varchar(255)                                                                                          | NO   |     |         |       |
 * oi_size        | int(8) unsigned                                                                                        | NO   |     | 0       |       |
 * oi_width       | int(5)                                                                                                 | NO   |     | 0       |       |
 * oi_height      | int(5)                                                                                                 | NO   |     | 0       |       |
 * oi_bits        | int(3)                                                                                                 | NO   |     | 0       |       |
 * oi_description | tinyblob                                                                                               | NO   |     | NULL    |       |
 * oi_user        | int(5) unsigned                                                                                        | NO   |     | 0       |       |
 * oi_user_text   | varchar(255)                                                                                           | NO   |     |         |       |
 * oi_timestamp   | varchar(14)                                                                                            | NO   |     |         |       |
 * oi_metadata    | mediumblob                                                                                             | NO   |     | NULL    |       |
 * oi_media_type  | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES  |     | NULL    |       |
 * oi_major_mime  | enum('unknown','application','audio','image','text','video','message','model','multipart')             | NO   |     | unknown |       |
 * oi_minor_mime  | varchar(32)                                                                                            | NO   |     | unknown |       |
 * oi_deleted     | tinyint(3) unsigned                                                                                    | NO   |     | 0       |       |
 * oi_sha1        | varchar(32)                                                                                            | NO   |     |         |       |

Imagelinks
+-+-+--+-+-+---+ +-+-+--+-+-+---+ +-+-+--+-+-+---+
 * Field  | Type            | Null | Key | Default | Extra |
 * il_from | int(8) unsigned | NO  |     | 0       |       |
 * il_to  | varchar(255)    | NO   |     |         |       |