parent
b25a8045b8
commit
9ab208e78c
@ -1,136 +1,143 @@
|
|||||||
/*
|
/*
|
||||||
* Remote Laboratory Database Definition
|
* Remote Laboratory Database Definition
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* (c) 2014 Timothy Pearson
|
* (c) 2014 Timothy Pearson
|
||||||
* Raptor Engineering
|
* Raptor Engineering
|
||||||
* http://www.raptorengineeringinc.com
|
* http://www.raptorengineeringinc.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*!40101 SET NAMES utf8 */;
|
||||||
/*!40101 SET NAMES utf8 */;
|
|
||||||
|
/*!40101 SET SQL_MODE=''*/;
|
||||||
/*!40101 SET SQL_MODE=''*/;
|
|
||||||
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/`remotelab` /*!40100 DEFAULT CHARACTER SET latin1 */;
|
||||||
CREATE DATABASE /*!32312 IF NOT EXISTS*/`remotelab` /*!40100 DEFAULT CHARACTER SET latin1 */;
|
|
||||||
|
USE `remotelab`;
|
||||||
USE `remotelab`;
|
|
||||||
|
/*Table structure for table `activity` */
|
||||||
/*Table structure for table `activity` */
|
|
||||||
|
DROP TABLE IF EXISTS `activity`;
|
||||||
DROP TABLE IF EXISTS `activity`;
|
|
||||||
|
CREATE TABLE `activity` (
|
||||||
CREATE TABLE `activity` (
|
`pk` int(20) NOT NULL AUTO_INCREMENT,
|
||||||
`pk` int(20) NOT NULL AUTO_INCREMENT,
|
`station` bigint(20) NOT NULL,
|
||||||
`station` bigint(20) NOT NULL,
|
`arbiter` text,
|
||||||
`username` text,
|
`username` text,
|
||||||
`realmname` text,
|
`realmname` text,
|
||||||
`logontime` bigint(20) DEFAULT NULL,
|
`logontime` bigint(20) DEFAULT NULL,
|
||||||
`serverid` bigint(20) DEFAULT NULL,
|
`serviceid` bigint(20) DEFAULT NULL,
|
||||||
`serviceid` bigint(20) DEFAULT NULL,
|
`terminate` bigint(20) NOT NULL,
|
||||||
`terminate` bigint(20) NOT NULL,
|
PRIMARY KEY (`pk`)
|
||||||
PRIMARY KEY (`pk`)
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
||||||
|
/*Table structure for table `dbschema` */
|
||||||
/*Table structure for table `permissions` */
|
|
||||||
|
DROP TABLE IF EXISTS `dbschema`;
|
||||||
DROP TABLE IF EXISTS `permissions`;
|
|
||||||
|
CREATE TABLE `dbschema` (
|
||||||
CREATE TABLE `permissions` (
|
`pk` bigint(20) NOT NULL,
|
||||||
`pk` bigint(20) NOT NULL AUTO_INCREMENT,
|
`skey` text NOT NULL,
|
||||||
`station` bigint(20) NOT NULL,
|
`value` text NOT NULL,
|
||||||
`groupname` text NOT NULL,
|
PRIMARY KEY (`pk`)
|
||||||
`realm` text,
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
`restrictions` text,
|
|
||||||
PRIMARY KEY (`pk`)
|
/*Table structure for table `permissions` */
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
|
|
||||||
|
DROP TABLE IF EXISTS `permissions`;
|
||||||
/*Table structure for table `services` */
|
|
||||||
|
CREATE TABLE `permissions` (
|
||||||
DROP TABLE IF EXISTS `services`;
|
`pk` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`station` bigint(20) NOT NULL,
|
||||||
CREATE TABLE `services` (
|
`groupname` text NOT NULL,
|
||||||
`pk` bigint(20) NOT NULL AUTO_INCREMENT,
|
`realm` text,
|
||||||
`station` bigint(20) NOT NULL,
|
`restrictions` text,
|
||||||
`servicetype` bigint(20) NOT NULL,
|
PRIMARY KEY (`pk`)
|
||||||
`hostname` text,
|
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;
|
||||||
`port` bigint(20) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`pk`)
|
/*Table structure for table `services` */
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
|
|
||||||
|
DROP TABLE IF EXISTS `services`;
|
||||||
/*Table structure for table `servicetypes` */
|
|
||||||
|
CREATE TABLE `services` (
|
||||||
DROP TABLE IF EXISTS `servicetypes`;
|
`pk` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`station` bigint(20) NOT NULL,
|
||||||
CREATE TABLE `servicetypes` (
|
`servicetype` bigint(20) NOT NULL,
|
||||||
`serviceid` bigint(20) NOT NULL AUTO_INCREMENT,
|
`hostname` text,
|
||||||
`name` text,
|
`port` bigint(20) DEFAULT NULL,
|
||||||
`description` text,
|
PRIMARY KEY (`pk`)
|
||||||
`client_library` text NOT NULL,
|
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
|
||||||
`version` bigint(20) DEFAULT NULL,
|
|
||||||
`single_instance` bigint(20) DEFAULT NULL,
|
/*Table structure for table `servicetypes` */
|
||||||
PRIMARY KEY (`serviceid`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
|
DROP TABLE IF EXISTS `servicetypes`;
|
||||||
|
|
||||||
/*Data for the table `servicetypes` */
|
CREATE TABLE `servicetypes` (
|
||||||
|
`serviceid` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
insert into `servicetypes`(`serviceid`,`name`,`description`,`client_library`,`version`,`single_instance`) values (1,'Remote FPGA','Remote FPGA access','libremotelab_fpgaviewer',1,1),(2,'Spectrum Analyzer','GPIB spectrum analyzer access','libremotelab_commanalyzer',1,1),(3,'FPGA Programmer','Remote FPGA programming','libremotelab_fpgaprogrammer',1,1),(4,'Oscilloscope','GPIB oscilloscope access','libremotelab_scope',1,1),(5,'Sensor Monitor','Sensor monitor access','libremotelab_sensormonitor',1,1),(6,'Administration Console','View and control active sessions','libremotelab_adminconsole',1,0),(7,'User Management Console','Manage user permissions','libremotelab_adminusermgmt',1,0),(8,'Logic Analyzer','View digital waveforms','libremotelab_logicanalyzer',1,1),(9,'Serial Console','Communicate via a serial connection','libremotelab_serialconsole',1,1);
|
`name` text,
|
||||||
|
`description` text,
|
||||||
/*Table structure for table `stations` */
|
`client_library` text NOT NULL,
|
||||||
|
`version` bigint(20) DEFAULT NULL,
|
||||||
DROP TABLE IF EXISTS `stations`;
|
`single_instance` bigint(20) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`serviceid`)
|
||||||
CREATE TABLE `stations` (
|
) ENGINE=InnoDB AUTO_INCREMENT=257 DEFAULT CHARSET=latin1;
|
||||||
`pk` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` text,
|
/*Table structure for table `stations` */
|
||||||
`description` text,
|
|
||||||
PRIMARY KEY (`pk`)
|
DROP TABLE IF EXISTS `stations`;
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
|
|
||||||
|
CREATE TABLE `stations` (
|
||||||
/*Table structure for table `statistics` */
|
`pk` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` text,
|
||||||
DROP TABLE IF EXISTS `statistics`;
|
`description` text,
|
||||||
|
PRIMARY KEY (`pk`)
|
||||||
CREATE TABLE `statistics` (
|
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=latin1;
|
||||||
`pk` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`timestamp` bigint(20) NOT NULL,
|
/*Table structure for table `statistics` */
|
||||||
`eventtypeid` bigint(20) NOT NULL,
|
|
||||||
`serverid` bigint(20) DEFAULT NULL,
|
DROP TABLE IF EXISTS `statistics`;
|
||||||
`sessionid` bigint(20) DEFAULT NULL,
|
|
||||||
`typeid` bigint(20) DEFAULT NULL,
|
CREATE TABLE `statistics` (
|
||||||
`userid` text,
|
`pk` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
PRIMARY KEY (`pk`)
|
`timestamp` bigint(20) NOT NULL,
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
|
`eventtypeid` bigint(20) NOT NULL,
|
||||||
|
`arbiter` text,
|
||||||
/*Table structure for table `status` */
|
`stationid` bigint(20) DEFAULT NULL,
|
||||||
|
`sessionid` bigint(20) DEFAULT NULL,
|
||||||
DROP TABLE IF EXISTS `status`;
|
`typeid` bigint(20) DEFAULT NULL,
|
||||||
|
`userid` text,
|
||||||
CREATE TABLE `status` (
|
PRIMARY KEY (`pk`)
|
||||||
`pk` bigint(20) NOT NULL AUTO_INCREMENT,
|
) ENGINE=InnoDB AUTO_INCREMENT=2339 DEFAULT CHARSET=latin1;
|
||||||
`hostname` text NOT NULL,
|
|
||||||
`online` tinyint(4) NOT NULL,
|
/*Table structure for table `status` */
|
||||||
PRIMARY KEY (`pk`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
DROP TABLE IF EXISTS `status`;
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
CREATE TABLE `status` (
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
`pk` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
`hostname` text NOT NULL,
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
`online` tinyint(4) NOT NULL,
|
||||||
|
PRIMARY KEY (`pk`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||||
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
Loading…
Reference in new issue