CREATE TABLE rpi_units(
  id int not null primary key auto_increment,
  `name` varchar(255) CHARACTER SET utf8,
  `mac` varchar(32) CHARACTER SET utf8
);



CREATE TABLE snap_shots(
  id int not null primary key auto_increment,
  `rpi_unit_id` int(10),
  `file_name` varchar(255) CHARACTER SET utf8,
  `shot_time` datetime
);


CREATE TABLE btn_status(
  `rpi_unit_id` int(10) primary key,
  `status` tinyint(4)
);


CREATE TABLE sensors(
  id int not null primary key auto_increment,
  `rpi_unit_id` int(10),
  `type` varchar(30) CHARACTER SET utf8,
  `val` float,
  `unit` varchar(10) CHARACTER SET utf8,
  `created_time` datetime
);
