diff --git a/etc/inau.sql b/etc/inau.sql new file mode 100644 index 0000000000000000000000000000000000000000..6afe348568884d5fb9951d53c9b7d23af119f328 --- /dev/null +++ b/etc/inau.sql @@ -0,0 +1,360 @@ +-- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64) +-- +-- Host: localhost Database: inau +-- ------------------------------------------------------ +-- Server version 5.7.28-0ubuntu0.18.04.4 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_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' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Current Database: `inau` +-- + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `inau` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `inau`; + +-- +-- Table structure for table `architectures` +-- + +DROP TABLE IF EXISTS `architectures`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `architectures` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `architectures` +-- + +LOCK TABLES `architectures` WRITE; +/*!40000 ALTER TABLE `architectures` DISABLE KEYS */; +INSERT INTO `architectures` VALUES (1,'ppc'),(2,'i686'),(3,'x86_64'); +/*!40000 ALTER TABLE `architectures` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `artifacts` +-- + +DROP TABLE IF EXISTS `artifacts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `artifacts` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `build_id` int(11) NOT NULL, + `hash` varchar(255) NOT NULL, + `filename` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + KEY `build_id` (`build_id`), + CONSTRAINT `artifacts_ibfk_1` FOREIGN KEY (`build_id`) REFERENCES `builds` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=238 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + + +-- +-- Table structure for table `builders` +-- + +DROP TABLE IF EXISTS `builders`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `builders` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `platform_id` int(11) NOT NULL, + `name` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`), + KEY `platform_id` (`platform_id`), + CONSTRAINT `builders_ibfk_1` FOREIGN KEY (`platform_id`) REFERENCES `platforms` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `builders` +-- + +LOCK TABLES `builders` WRITE; +/*!40000 ALTER TABLE `builders` DISABLE KEYS */; +INSERT INTO `builders` VALUES (1,1,'aringa'),(2,2,'ken'),(3,3,'ken64'),(4,4,'sakurambo'),(5,5,'kenng64'),(6,6,'gaia'),(7,7,'sakurambo64'); +/*!40000 ALTER TABLE `builders` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `builds` +-- + +DROP TABLE IF EXISTS `builds`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `builds` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `repository_id` int(11) NOT NULL, + `tag` varchar(255) NOT NULL, + `date` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `repository_id` (`repository_id`), + CONSTRAINT `builds_ibfk_1` FOREIGN KEY (`repository_id`) REFERENCES `repositories` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=230 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `builds` +-- + +-- +-- Table structure for table `distributions` +-- + +DROP TABLE IF EXISTS `distributions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `distributions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `version` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `distributions` +-- + +LOCK TABLES `distributions` WRITE; +/*!40000 ALTER TABLE `distributions` DISABLE KEYS */; +INSERT INTO `distributions` VALUES (1,'Debian','3.0'),(2,'Ubuntu','7.10'),(3,'Ubuntu','10.04'),(4,'Ubuntu','14.04'),(5,'Ubuntu','16.04'),(6,'Ubuntu','18.04'),(7,'Ubuntu','10.04-caen'); +/*!40000 ALTER TABLE `distributions` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `facilities` +-- + +DROP TABLE IF EXISTS `facilities`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `facilities` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `facilities` +-- + +LOCK TABLES `facilities` WRITE; +/*!40000 ALTER TABLE `facilities` DISABLE KEYS */; +INSERT INTO `facilities` VALUES (7,'diproi'),(1,'elettra'),(2,'fermi'),(9,'ldm'),(6,'magnedyn'),(3,'padres'),(8,'terafermi'),(5,'timer'),(4,'timex'); +/*!40000 ALTER TABLE `facilities` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `hosts` +-- + +DROP TABLE IF EXISTS `hosts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `hosts` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `facility_id` int(11) NOT NULL, + `server_id` int(11) NOT NULL, + `name` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`), + KEY `facility_id` (`facility_id`), + KEY `server_id` (`server_id`), + CONSTRAINT `hosts_ibfk_1` FOREIGN KEY (`facility_id`) REFERENCES `facilities` (`id`), + CONSTRAINT `hosts_ibfk_2` FOREIGN KEY (`server_id`) REFERENCES `servers` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=138 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `hosts` +-- + +-- +-- Table structure for table `installations` +-- + +DROP TABLE IF EXISTS `installations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `installations` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `host_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `build_id` int(11) NOT NULL, + `type` int(11) NOT NULL, + `date` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `host_id` (`host_id`), + KEY `user_id` (`user_id`), + KEY `build_id` (`build_id`), + CONSTRAINT `installations_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`id`), + CONSTRAINT `installations_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`), + CONSTRAINT `installations_ibfk_3` FOREIGN KEY (`build_id`) REFERENCES `builds` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4982 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `installations` +-- + +-- +-- Table structure for table `platforms` +-- + +DROP TABLE IF EXISTS `platforms`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `platforms` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `distribution_id` int(11) NOT NULL, + `architecture_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `distribution_id` (`distribution_id`), + KEY `architecture_id` (`architecture_id`), + CONSTRAINT `platforms_ibfk_1` FOREIGN KEY (`distribution_id`) REFERENCES `distributions` (`id`), + CONSTRAINT `platforms_ibfk_2` FOREIGN KEY (`architecture_id`) REFERENCES `architectures` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `platforms` +-- + +LOCK TABLES `platforms` WRITE; +/*!40000 ALTER TABLE `platforms` DISABLE KEYS */; +INSERT INTO `platforms` VALUES (1,2,1),(2,3,2),(3,3,3),(4,4,3),(5,5,3),(6,6,3),(7,7,3); +/*!40000 ALTER TABLE `platforms` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `providers` +-- + +DROP TABLE IF EXISTS `providers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `providers` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `url` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `url` (`url`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `providers` +-- + +LOCK TABLES `providers` WRITE; +/*!40000 ALTER TABLE `providers` DISABLE KEYS */; +INSERT INTO `providers` VALUES (6,'https://github.com/ELETTRA-SincrotroneTrieste/'),(3,'ssh://git@gitlab.elettra.eu:/alessio.bogani/'),(1,'ssh://git@gitlab.elettra.eu:/cs/ds/'),(4,'ssh://git@gitlab.elettra.eu:/cs/etc/browser/'),(2,'ssh://git@gitlab.elettra.eu:/cs/gui/'),(5,'ssh://git@gitlab.elettra.eu:/cs/util/'); +/*!40000 ALTER TABLE `providers` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `repositories` +-- + +DROP TABLE IF EXISTS `repositories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `repositories` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `provider_id` int(11) NOT NULL, + `platform_id` int(11) NOT NULL, + `type` int(11) NOT NULL, + `name` varchar(255) NOT NULL, + `destination` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + KEY `provider_id` (`provider_id`), + KEY `platform_id` (`platform_id`), + CONSTRAINT `repositories_ibfk_1` FOREIGN KEY (`provider_id`) REFERENCES `providers` (`id`), + CONSTRAINT `repositories_ibfk_2` FOREIGN KEY (`platform_id`) REFERENCES `platforms` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=193 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `repositories` +-- + +-- +-- Table structure for table `servers` +-- + +DROP TABLE IF EXISTS `servers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `servers` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `platform_id` int(11) NOT NULL, + `name` varchar(255) NOT NULL, + `prefix` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + KEY `platform_id` (`platform_id`), + CONSTRAINT `servers_ibfk_1` FOREIGN KEY (`platform_id`) REFERENCES `platforms` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `servers` +-- + +-- +-- Table structure for table `users` +-- + +DROP TABLE IF EXISTS `users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `admin` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `users` +-- + +LOCK TABLES `users` WRITE; +/*!40000 ALTER TABLE `users` DISABLE KEYS */; +INSERT INTO `users` VALUES (1,'alessio.bogani',1),(2,'lorenzo.pivetta',1); +/*!40000 ALTER TABLE `users` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2020-05-06 12:37:09