alter table stats drop column id; alter table stats modify column hostname varchar(64) not null; alter table stats modify column if_name varchar(32) not null; alter table stats modify column stamp int not null; alter table stats add primary key host_if (stamp, hostname, if_name); create table reports( id int not null auto_increment primary key, name varchar(255), host_if text, bytes varchar(1), packets varchar(1), errors varchar(1), dropped varchar(1), reportctl varchar(4), timeperiod varchar(24), time_x smallint, f_month tinyint, f_day tinyint, f_year smallint, f_hour tinyint, f_min tinyint, f_sec tinyint, t_month tinyint, t_day tinyint, t_year smallint, t_hour tinyint, t_min tinyint, t_sec tinyint, x smallint, y smallint, summ_interval mediumint, summ_units enum("second", "minute", "hour", "month", "day", "year") );