create table version ( id bigint AUTO_INCREMENT PRIMARY KEY, server int not null, version float, build int, macho int, branch char(16), seen int, first datetime, last datetime, tstamp timestamp, unique key server_build (server, build) ); create table server ( id int AUTO_INCREMENT PRIMARY KEY, ip char(15), port int, name char(32), active int, key serv_name (name) ); create table patch ( id int AUTO_INCREMENT PRIMARY KEY, old int, new int, url char(100), bytes int, md5 char(32), sha1 char(40), first datetime, last datetime, tstamp timestamp, key old (old), key new (new), unique key old_new (old, new) );