I'm storing database dumps into a MySQL table, so, I intend to store a maximum of 10 different dumps. The 11th different dump and on should have data set to NULL, to save space but keep some info available.
Same dumps have the same drive_md5.
CREATE TABLE `dumps` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`db_id` int(11) NOT NULL,
`drive_id` char(28) DEFAULT NULL,
`drive_md5` char(32) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`data` longblob,
`filesize` mediumint(8) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `drive_md5` (`drive_md5`),
KEY `db_id` (`db_id`)
) ENGINE=MyISAM AUTO_INCREMENT=43 DEFAULT CHARSET=utf8
If you need more info, please leave a comment so I can edit the question. Thanks
Edit: I'm accepting a clearer title's suggestion.