--
-- Database: `sensors`
--

-- --------------------------------------------------------

--
-- Table structure for table `sensors_data`
--

CREATE TABLE IF NOT EXISTS `sensors_data` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `sid` int(10) DEFAULT NULL,
  `timestamp` varchar(255) DEFAULT NULL,
  `value` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `data_timestamp` (`timestamp`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=43 ;

-- --------------------------------------------------------

--
-- Table structure for table `sensors_groups`
--

CREATE TABLE IF NOT EXISTS `sensors_groups` (
  `gid` int(10) NOT NULL AUTO_INCREMENT,
  `group_name` varchar(255) CHARACTER SET ascii NOT NULL,
  PRIMARY KEY (`gid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

-- --------------------------------------------------------

--
-- Table structure for table `sensors_info`
--

CREATE TABLE IF NOT EXISTS `sensors_info` (
  `sid` int(10) NOT NULL AUTO_INCREMENT,
  `sensor_id` varchar(25) NOT NULL DEFAULT '',
  `sensor_bus` varchar(15) NOT NULL,
  `sensor_name` varchar(15) NOT NULL DEFAULT '',
  `sensor_state` varchar(3) NOT NULL,
  `sensor_setup` varchar(3) NOT NULL DEFAULT '',
  `sensor_type` varchar(255) NOT NULL DEFAULT '',
  `sensor_plot` varchar(10) NOT NULL,
  `sensor_error` varchar(50) NOT NULL,
  `sensor_geotag` varchar(50) NOT NULL DEFAULT '',
  `sensor_limit1` varchar(50) NOT NULL DEFAULT '',
  `sensor_limit2` varchar(50) NOT NULL DEFAULT '',
  `sensor_limit3` varchar(50) NOT NULL DEFAULT '',
  `sensor_limit4` varchar(50) NOT NULL DEFAULT '',
  `sensor_group` int(10) NOT NULL,
  `sensor_comment` text NOT NULL,
  PRIMARY KEY (`sid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;

-- --------------------------------------------------------

--
-- Table structure for table `sensors_system`
--

CREATE TABLE IF NOT EXISTS `sensors_system` (
  `name` varchar(50) NOT NULL DEFAULT '',
  `value` varchar(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `sensors_users`
--

CREATE TABLE IF NOT EXISTS `sensors_users` (
  `uid` int(10) NOT NULL AUTO_INCREMENT,
  `username` varchar(15) NOT NULL DEFAULT '',
  `passcode` varchar(50) NOT NULL DEFAULT '',
  `fullname` varchar(255) NOT NULL DEFAULT '',
  `comment` text NOT NULL,
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

