-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               10.1.29-MariaDB - mariadb.org binary distribution
-- Server OS:                    Win32
-- HeidiSQL Version:             12.4.0.6659
-- --------------------------------------------------------

/*!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 database structure for markuss_luksafori
CREATE DATABASE IF NOT EXISTS `markuss_luksafori` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;
USE `markuss_luksafori`;

-- Dumping structure for table markuss_luksafori.object
CREATE TABLE IF NOT EXISTS `object` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- Dumping data for table markuss_luksafori.object: ~53 rows (approximately)
INSERT INTO `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 markuss_luksafori.plan
CREATE TABLE IF NOT EXISTS `plan` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_obj` int(11) NOT NULL,
  `cycle` int(11) NOT NULL,
  `red_amber` int(11) NOT NULL,
  `amber` int(11) NOT NULL,
  `pedestrians_flash` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_plan_object` (`id_obj`),
  CONSTRAINT `FK_plan_object` FOREIGN KEY (`id_obj`) REFERENCES `object` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- Dumping data for table markuss_luksafori.plan: ~1 rows (approximately)
INSERT INTO `plan` (`id`, `id_obj`, `cycle`, `red_amber`, `amber`, `pedestrians_flash`) VALUES
	(1, 16, 120, 2, 3, 5);

-- Dumping structure for table markuss_luksafori.program
CREATE TABLE IF NOT EXISTS `program` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_plan` int(11) NOT NULL DEFAULT '0',
  `type` varchar(50) COLLATE utf8_unicode_ci DEFAULT '0',
  `direct` int(11) DEFAULT '0',
  `green_offset` int(11) DEFAULT '0',
  `green_len` int(11) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `FK_program_plan` (`id_plan`),
  CONSTRAINT `FK_program_plan` FOREIGN KEY (`id_plan`) REFERENCES `plan` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- Dumping data for table markuss_luksafori.program: ~5 rows (approximately)
INSERT INTO `program` (`id`, `id_plan`, `type`, `direct`, `green_offset`, `green_len`) VALUES
	(1, 1, 'v', 4, 0, 60),
	(2, 1, 'v', 7, 82, 31),
	(3, 1, 'v', 10, 0, 58),
	(4, 1, 'gp', 4, 65, 40),
	(5, 1, 'gp', 7, 0, 72);

/*!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) */;
