--
-- Database: `webuser`
--

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

--
-- Table structure for table `ci_sessions`
--

CREATE TABLE IF NOT EXISTS `ci_sessions` (
  `session_id` varchar(40) NOT NULL default '0',
  `ip_address` varchar(16) NOT NULL default '0',
  `user_agent` varchar(120) NOT NULL,
  `last_activity` int(10) unsigned NOT NULL default '0',
  `user_data` text NOT NULL,
  PRIMARY KEY  (`session_id`),
  KEY `last_activity_idx` (`last_activity`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `DataEntryConfig`
--

CREATE TABLE IF NOT EXISTS `DataEntryConfig` (
  `DataEntryConfig_ID` int(11) NOT NULL auto_increment,
  `Plots_ID` int(11) NOT NULL,
  `DatabaseName` varchar(64) NOT NULL,
  `FormType` varchar(40) NOT NULL,
  `ColumnNumber` int(11) default NULL,
  `ColumnType` varchar(40) NOT NULL,
  `Attributes` text NOT NULL,
  PRIMARY KEY  (`DataEntryConfig_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `DownloadLink`
--

CREATE TABLE IF NOT EXISTS `DownloadLink` (
  `DownloadLinkID` int(10) unsigned NOT NULL auto_increment,
  `Title` varchar(80) NOT NULL,
  `Path` varchar(120) NOT NULL,
  `Date` varchar(40) NOT NULL,
  `DatabaseName` varchar(40) NOT NULL,
  `LinkType` varchar(40) NOT NULL,
  PRIMARY KEY  (`DownloadLinkID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `Plots`
--

CREATE TABLE IF NOT EXISTS `Plots` (
  `Plots_ID` int(11) NOT NULL auto_increment,
  `PlotName` varchar(40) NOT NULL,
  `DatabaseName` varchar(40) NOT NULL,
  `DatabaseVersion` varchar(40) NOT NULL default 'old',
  PRIMARY KEY  (`Plots_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `Users`
--

CREATE TABLE IF NOT EXISTS `Users` (
  `UserID` int(10) unsigned NOT NULL auto_increment,
  `UserName` char(32) NOT NULL,
  `Pwd` char(41) NOT NULL,
  `DatabaseName` char(32) NOT NULL,
  `ExpirationDate` date NOT NULL,
  `Path` char(64) default NULL,
  PRIMARY KEY  (`UserID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;