create table mileage_log (
  num              int(11) default 0 not null auto_increment,
  Mkey             int(10) default 0 not null,
  id               varchar(20) default '' not null,
  name             varchar(30) default '',
  service          varchar(15) default '' not null,
  service_contents text default '',
  mileage          int(11) default '0' not null,
  type             tinyint(1) not null,
  cancel_reason    tinytext default '',
  status           tinyint(1) default 0,
  refer            tinytext default '',
  regdate          datetime not null,
  primary key(num),
  index(Mkey),
  index(type),
  index(regdate)
);