-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               10.4.32-MariaDB - mariadb.org binary distribution
-- Server OS:                    Win64
-- HeidiSQL Version:             12.6.0.6765
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!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 */;

-- Dumping structure for table saulitis-luksafori.saulitis_object
CREATE TABLE IF NOT EXISTS `saulitis_object` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Dumping data for table saulitis-luksafori.saulitis_object: ~53 rows (approximately)
INSERT INTO `saulitis_object` (`id`, `name`) VALUES
	(1, 'Atmodas-Asteru'),
	(2, 'Brīvības-Garozas'),
	(3, 'Brīvības-Lāčplēša'),
	(4, 'Dobeles-4. līnija'),
	(5, 'Dobeles-5. līnija'),
	(6, 'Dobeles-Atmodas'),
	(7, 'Dobeles-Brieža'),
	(8, 'Dobeles-Pasta-Blaumaņa'),
	(9, 'Dobeles-Satiksmes-Aspazijas'),
	(10, 'Dobeles-Uzvaras'),
	(11, 'Lielā-Akadēmijas-Uzvaras'),
	(12, 'Lielā-Čakstes'),
	(13, 'Lielā-Dambja-Barona'),
	(14, 'Lielā-IKI'),
	(15, 'Lielā-Kalpaka'),
	(16, 'Lielā-Katoļu'),
	(17, 'Lielā-Māras-Dobeles'),
	(18, 'Lielā-Mātera'),
	(19, 'Lielā-Pasta'),
	(20, 'Lielā-Pētera-Barona'),
	(21, 'Lietuvas-Miera-Platones'),
	(22, 'Lietuvas-Savienības'),
	(23, 'Mātera-Svētes'),
	(24, 'Mātera-Zirgu'),
	(26, 'Pasta-Driksas'),
	(27, 'Pasta-Edžus'),
	(28, 'Pasta-Sporta-Zirgu'),
	(29, 'Pasta-Stacijas'),
	(30, 'Raiņa-Akadēmijas'),
	(31, 'Raiņa-Kalpaka'),
	(32, 'Raiņa-Katoļu'),
	(33, 'Raiņa-Mātera'),
	(34, 'Raiņa-Pasta'),
	(35, 'Raiņa-Tērvetes-Sarmas-Filozofu'),
	(36, 'Rīgas-Brīvības'),
	(37, 'Rīgas-Institūta-Lāčplēša'),
	(38, 'Rīgas-Izstādes'),
	(39, 'Rīgas-Kalnciema-Garozas'),
	(40, 'Rīgas-Keramika'),
	(41, 'Rīgas-Loka'),
	(42, 'Rīgas-Pērnavas-Pumpura'),
	(43, 'Rīgas-Strazdu'),
	(44, 'Rūpniecības'),
	(45, 'Rūpniecības-Dambja-Atmodas'),
	(46, 'Rūpniecības-Filozofu'),
	(47, 'Rūpniecības-Kalpaka-Dzelzceļnieku'),
	(48, 'Rūpniecības-Mātera'),
	(49, 'Rūpniecības-Tērvetes'),
	(50, 'Satiksmes-Meiju-Zvejnieku'),
	(51, 'Uzvaras-Barona'),
	(52, 'Zemgales-Jāņa-Palīdzības'),
	(53, 'Zemgales-Sporta'),
	(54, 'Zemgales-Stacijas');

-- Dumping structure for table saulitis-luksafori.saulitis_plan
CREATE TABLE IF NOT EXISTS `saulitis_plan` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_obj` int(11) NOT NULL DEFAULT 0,
  `cycle` int(11) NOT NULL DEFAULT 0,
  `red_amber` int(11) NOT NULL DEFAULT 0,
  `amber` int(11) NOT NULL DEFAULT 0,
  `pedestrians_flash` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `FK_plan_object` (`id_obj`),
  CONSTRAINT `FK_plan_object` FOREIGN KEY (`id_obj`) REFERENCES `saulitis_object` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Dumping data for table saulitis-luksafori.saulitis_plan: ~4 rows (approximately)
INSERT INTO `saulitis_plan` (`id`, `id_obj`, `cycle`, `red_amber`, `amber`, `pedestrians_flash`) VALUES
	(1, 4, 80, 2, 3, 5),
	(2, 6, 90, 2, 3, 5),
	(3, 1, 81, 2, 2, 5),
	(4, 3, 75, 2, 3, 5),
	(50, 11, 123, 456, 789, 23);

-- Dumping structure for table saulitis-luksafori.saulitis_program
CREATE TABLE IF NOT EXISTS `saulitis_program` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_plan` int(11) DEFAULT NULL,
  `type` char(50) DEFAULT NULL,
  `direct` int(11) DEFAULT NULL,
  `green_offset` int(11) DEFAULT NULL,
  `green_len` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_program_plan` (`id_plan`),
  CONSTRAINT `FK_program_plan` FOREIGN KEY (`id_plan`) REFERENCES `saulitis_plan` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Dumping data for table saulitis-luksafori.saulitis_program: ~24 rows (approximately)
INSERT INTO `saulitis_program` (`id`, `id_plan`, `type`, `direct`, `green_offset`, `green_len`) VALUES
	(1, 1, 'v', 4, 28, 47),
	(2, 1, 'v', 10, 28, 47),
	(3, 1, 'v', 12, 0, 0),
	(4, 1, 'gp', 1, 28, 42),
	(5, 1, 'v', 1, 0, 22),
	(6, 1, 'gp', 4, 0, 15),
	(7, 1, 'gp', 10, 0, 15),
	(8, 2, 'v', 4, 0, 53),
	(9, 2, 'v', 6, 0, 21),
	(10, 2, 'v', 7, 0, 21),
	(11, 2, 'v', 10, 0, 27),
	(12, 2, 'gp', 4, 56, 12),
	(13, 2, 'gp', 7, 56, 22),
	(14, 2, 'gp', 10, 56, 12),
	(15, 3, 'v', 4, 0, 50),
	(16, 3, 'v', 7, 0, 50),
	(17, 3, 'gp', 10, 10, 15),
	(18, 4, 'v', 4, 0, 37),
	(19, 4, 'v', 7, 0, 37),
	(20, 4, 'v', 10, 43, 26),
	(21, 4, 'gp', 1, 43, 18),
	(22, 4, 'gp', 4, 43, 18),
	(23, 4, 'gp', 7, 0, 27),
	(24, 4, 'gp', 10, 0, 27);

/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
