-- --------------------------------------------------------
-- Hostitel:                     localhost
-- Verze serveru:                5.5.30 - MySQL Community Server (GPL)
-- OS serveru:                   Win64
-- HeidiSQL Verze:               11.0.0.5919
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!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' */;


-- Exportování struktury databáze pro
DROP DATABASE IF EXISTS `thesis`;
CREATE DATABASE IF NOT EXISTS `thesis` /*!40100 DEFAULT CHARACTER SET latin7 COLLATE latin7_general_cs */;
USE `thesis`;

-- Exportování struktury pro tabulka thesis.absence
DROP TABLE IF EXISTS `absence`;
CREATE TABLE IF NOT EXISTS `absence` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `zak_id` int(11) DEFAULT NULL,
  `ucitele_id` int(11) DEFAULT NULL,
  `pritomen` tinyint(1) NOT NULL,
  `datum` date NOT NULL,
  `poznamka` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `predmet_id` int(11) DEFAULT NULL,
  `doba_id` int(11) NOT NULL,
  `cas_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_765AE0C9CA0EBDD9` (`zak_id`),
  KEY `IDX_765AE0C9D084CBD5` (`ucitele_id`),
  KEY `IDX_765AE0C9B4810FC4` (`predmet_id`),
  KEY `IDX_765AE0C9E25FA26E` (`doba_id`) USING BTREE,
  KEY `IDX_765AE0C97B7A91FA` (`cas_id`),
  CONSTRAINT `FK_765AE0C97B7A91FA` FOREIGN KEY (`cas_id`) REFERENCES `cas` (`id`),
  CONSTRAINT `FK_765AE0C9B4810FC4` FOREIGN KEY (`predmet_id`) REFERENCES `predmet` (`id`),
  CONSTRAINT `FK_765AE0C9CA0EBDD9` FOREIGN KEY (`zak_id`) REFERENCES `zak` (`id`),
  CONSTRAINT `FK_765AE0C9D084CBD5` FOREIGN KEY (`ucitele_id`) REFERENCES `ucitele` (`id`),
  CONSTRAINT `FK_765AE0C9E25FA26E` FOREIGN KEY (`doba_id`) REFERENCES `doba` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.absence: ~8 rows (přibližně)
DELETE FROM `absence`;
/*!40000 ALTER TABLE `absence` DISABLE KEYS */;
INSERT INTO `absence` (`id`, `zak_id`, `ucitele_id`, `pritomen`, `datum`, `poznamka`, `predmet_id`, `doba_id`, `cas_id`) VALUES
	(1, 1, NULL, 1, '2020-11-21', NULL, NULL, 1, 0),
	(2, 1, NULL, 1, '2020-11-22', NULL, NULL, 2, 0),
	(3, 1, NULL, 0, '2020-11-25', NULL, 1, 1, 0),
	(4, 1, NULL, 0, '2020-11-25', 'Návštěva lékaře', 3, 9, 0),
	(19, 4, NULL, 1, '2020-11-18', NULL, 13, 9, 0),
	(20, 1, NULL, 0, '2020-11-23', NULL, 2, 1, 0),
	(25, 1, NULL, 0, '2020-11-30', NULL, 2, 1, 2),
	(29, NULL, 11, 0, '2020-11-30', NULL, 1, 1, 1);
/*!40000 ALTER TABLE `absence` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.cas
DROP TABLE IF EXISTS `cas`;
CREATE TABLE IF NOT EXISTS `cas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `den_id` int(11) NOT NULL,
  `predmet_id` int(11) NOT NULL,
  `ucitel_id` int(11) NOT NULL,
  `trida_id` int(11) NOT NULL,
  `ucebna_id` int(11) NOT NULL,
  `doba_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_3AD60B318C88C0` (`den_id`),
  KEY `IDX_3AD60BB4810FC4` (`predmet_id`),
  KEY `IDX_3AD60B35E6DF29` (`ucitel_id`),
  KEY `IDX_3AD60B6F1C825A` (`trida_id`),
  KEY `IDX_3AD60BA273BD17` (`ucebna_id`),
  KEY `IDX_3AD60BE25FA26E` (`doba_id`),
  CONSTRAINT `FK_3AD60B318C88C0` FOREIGN KEY (`den_id`) REFERENCES `den` (`id`),
  CONSTRAINT `FK_3AD60B35E6DF29` FOREIGN KEY (`ucitel_id`) REFERENCES `ucitele` (`id`),
  CONSTRAINT `FK_3AD60B6F1C825A` FOREIGN KEY (`trida_id`) REFERENCES `trida` (`id`),
  CONSTRAINT `FK_3AD60BA273BD17` FOREIGN KEY (`ucebna_id`) REFERENCES `ucebna` (`id`),
  CONSTRAINT `FK_3AD60BB4810FC4` FOREIGN KEY (`predmet_id`) REFERENCES `predmet` (`id`),
  CONSTRAINT `FK_3AD60BE25FA26E` FOREIGN KEY (`doba_id`) REFERENCES `doba` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.cas: ~9 rows (přibližně)
DELETE FROM `cas`;
/*!40000 ALTER TABLE `cas` DISABLE KEYS */;
INSERT INTO `cas` (`id`, `den_id`, `predmet_id`, `ucitel_id`, `trida_id`, `ucebna_id`, `doba_id`) VALUES
	(1, 1, 1, 11, 4, 1, 1),
	(2, 1, 2, 14, 1, 3, 1),
	(3, 1, 1, 16, 1, 1, 2),
	(4, 1, 4, 11, 1, 1, 4),
	(5, 1, 4, 11, 4, 1, 4),
	(6, 1, 1, 1, 26, 1, 1),
	(7, 2, 3, 13, 2, 5, 1),
	(8, 3, 3, 16, 1, 2, 9),
	(9, 3, 13, 1, 6, 1, 9);
/*!40000 ALTER TABLE `cas` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.den
DROP TABLE IF EXISTS `den`;
CREATE TABLE IF NOT EXISTS `den` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `den` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.den: ~5 rows (přibližně)
DELETE FROM `den`;
/*!40000 ALTER TABLE `den` DISABLE KEYS */;
INSERT INTO `den` (`id`, `den`) VALUES
	(1, 'Pondělí'),
	(2, 'Úterý'),
	(3, 'Středa'),
	(4, 'Čtvrtek'),
	(5, 'Pátek');
/*!40000 ALTER TABLE `den` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.doba
DROP TABLE IF EXISTS `doba`;
CREATE TABLE IF NOT EXISTS `doba` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `doba` time NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.doba: ~9 rows (přibližně)
DELETE FROM `doba`;
/*!40000 ALTER TABLE `doba` DISABLE KEYS */;
INSERT INTO `doba` (`id`, `doba`) VALUES
	(1, '08:00:00'),
	(2, '08:55:00'),
	(3, '10:00:00'),
	(4, '10:55:00'),
	(5, '11:50:00'),
	(6, '12:45:00'),
	(7, '13:35:00'),
	(8, '14:25:00'),
	(9, '15:15:00');
/*!40000 ALTER TABLE `doba` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.historie
DROP TABLE IF EXISTS `historie`;
CREATE TABLE IF NOT EXISTS `historie` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `rok` smallint(6) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.historie: ~23 rows (přibližně)
DELETE FROM `historie`;
/*!40000 ALTER TABLE `historie` DISABLE KEYS */;
INSERT INTO `historie` (`id`, `rok`) VALUES
	(1, 2020),
	(4, 2019),
	(5, 2018),
	(6, 2017),
	(7, 2016),
	(8, 2015),
	(9, 2014),
	(10, 2013),
	(11, 2012),
	(12, 2011),
	(13, 2010),
	(14, 2009),
	(15, 2008),
	(16, 2007),
	(17, 2006),
	(18, 2005),
	(19, 2004),
	(20, 2003),
	(21, 2002),
	(22, 2001),
	(23, 2000),
	(24, 2020),
	(25, 2020);
/*!40000 ALTER TABLE `historie` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.historie_trida
DROP TABLE IF EXISTS `historie_trida`;
CREATE TABLE IF NOT EXISTS `historie_trida` (
  `historie_id` int(11) NOT NULL,
  `trida_id` int(11) NOT NULL,
  PRIMARY KEY (`historie_id`,`trida_id`),
  KEY `IDX_5E7BBD9F779817B8` (`historie_id`),
  KEY `IDX_5E7BBD9F6F1C825A` (`trida_id`),
  CONSTRAINT `FK_5E7BBD9F6F1C825A` FOREIGN KEY (`trida_id`) REFERENCES `trida` (`id`) ON DELETE CASCADE,
  CONSTRAINT `FK_5E7BBD9F779817B8` FOREIGN KEY (`historie_id`) REFERENCES `historie` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.historie_trida: ~7 rows (přibližně)
DELETE FROM `historie_trida`;
/*!40000 ALTER TABLE `historie_trida` DISABLE KEYS */;
INSERT INTO `historie_trida` (`historie_id`, `trida_id`) VALUES
	(1, 1),
	(1, 10),
	(4, 7),
	(5, 4),
	(6, 1),
	(24, 2),
	(25, 6);
/*!40000 ALTER TABLE `historie_trida` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.historie_zak
DROP TABLE IF EXISTS `historie_zak`;
CREATE TABLE IF NOT EXISTS `historie_zak` (
  `historie_id` int(11) NOT NULL,
  `zak_id` int(11) NOT NULL,
  PRIMARY KEY (`historie_id`,`zak_id`),
  KEY `IDX_AEB81D98779817B8` (`historie_id`),
  KEY `IDX_AEB81D98CA0EBDD9` (`zak_id`),
  CONSTRAINT `FK_AEB81D98779817B8` FOREIGN KEY (`historie_id`) REFERENCES `historie` (`id`) ON DELETE CASCADE,
  CONSTRAINT `FK_AEB81D98CA0EBDD9` FOREIGN KEY (`zak_id`) REFERENCES `zak` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.historie_zak: ~7 rows (přibližně)
DELETE FROM `historie_zak`;
/*!40000 ALTER TABLE `historie_zak` DISABLE KEYS */;
INSERT INTO `historie_zak` (`historie_id`, `zak_id`) VALUES
	(1, 1),
	(1, 2),
	(4, 2),
	(5, 2),
	(6, 2),
	(24, 3),
	(25, 4);
/*!40000 ALTER TABLE `historie_zak` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.migration_versions
DROP TABLE IF EXISTS `migration_versions`;
CREATE TABLE IF NOT EXISTS `migration_versions` (
  `version` varchar(14) COLLATE utf8mb4_unicode_ci NOT NULL,
  `executed_at` datetime NOT NULL COMMENT '(DC2Type:datetime_immutable)',
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.migration_versions: ~33 rows (přibližně)
DELETE FROM `migration_versions`;
/*!40000 ALTER TABLE `migration_versions` DISABLE KEYS */;
INSERT INTO `migration_versions` (`version`, `executed_at`) VALUES
	('20201116194855', '2020-11-16 19:50:41'),
	('20201116200919', '2020-11-16 20:09:27'),
	('20201116204535', '2020-11-16 20:45:44'),
	('20201116212829', '2020-11-16 21:28:36'),
	('20201119210320', '2020-11-19 21:03:43'),
	('20201119211024', '2020-11-19 21:10:31'),
	('20201119212955', '2020-11-19 21:30:02'),
	('20201119221518', '2020-11-19 22:15:27'),
	('20201119235821', '2020-11-19 23:58:27'),
	('20201120220550', '2020-11-20 22:06:02'),
	('20201122224231', '2020-11-22 22:42:39'),
	('20201123013722', '2020-11-23 01:37:29'),
	('20201125003133', '2020-11-25 00:49:31'),
	('20201125223032', '2020-11-25 22:30:42'),
	('20201125223949', '2020-11-25 22:39:54'),
	('20201125224720', '2020-11-25 22:47:25'),
	('20201127234758', '2020-11-27 23:48:06'),
	('20201128215656', '2020-11-28 21:58:45'),
	('20201129114629', '2020-11-29 11:46:35'),
	('20201129124408', '2020-11-29 12:44:14'),
	('20201129125240', '2020-11-29 12:52:46'),
	('20201129134411', '2020-11-29 13:44:16'),
	('20201129135943', '2020-11-29 13:59:50'),
	('20201129141629', '2020-11-29 14:16:33'),
	('20201129142235', '2020-11-29 14:22:39'),
	('20201129142607', '2020-11-29 14:26:12'),
	('20201129143317', '2020-11-29 14:33:22'),
	('20201129144515', '2020-11-29 14:45:19'),
	('20201129155603', '2020-11-29 15:56:08'),
	('20201129165939', '2020-11-29 16:59:46'),
	('20201129180858', '2020-11-29 18:09:03'),
	('20201129181044', '2020-11-29 18:10:49'),
	('20201129181139', '2020-11-29 18:11:42');
/*!40000 ALTER TABLE `migration_versions` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.predmet
DROP TABLE IF EXISTS `predmet`;
CREATE TABLE IF NOT EXISTS `predmet` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `skola_id` int(11) DEFAULT NULL,
  `nazev` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `zkratka` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `jazyk` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_DD95494271B6FA82` (`skola_id`),
  CONSTRAINT `FK_DD95494271B6FA82` FOREIGN KEY (`skola_id`) REFERENCES `skola` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.predmet: ~20 rows (přibližně)
DELETE FROM `predmet`;
/*!40000 ALTER TABLE `predmet` DISABLE KEYS */;
INSERT INTO `predmet` (`id`, `skola_id`, `nazev`, `zkratka`, `jazyk`) VALUES
	(1, 1, 'Český Jazyk', 'ČJ', 'Český'),
	(2, 1, 'Matematika', 'M', 'Český'),
	(3, 1, 'Prvouka', 'Pr', 'Český'),
	(4, 1, 'Anglický Jazyk', 'AJ', 'Český'),
	(5, 1, 'Hudební Výchova', 'HV', 'Český'),
	(6, 1, 'Výtvarná Výchova', 'VV', 'Český'),
	(7, 1, 'Tělesná Výchova', 'TV', 'Český'),
	(8, 1, 'Pracovní Činnosti', 'PČ', 'Český'),
	(9, 1, 'Vlastivěda', 'V', 'Český'),
	(10, 1, 'Přírodověda', 'Př', 'Český'),
	(11, 1, 'Dějepis', 'D', 'Český'),
	(12, 1, 'Fyzika', 'F', 'Český'),
	(13, 1, 'Chemie', 'Ch', 'Český'),
	(14, 1, 'Německý Jazyk', 'NJ', 'Český'),
	(15, 1, 'Občanská Výchova', 'OV', 'Český'),
	(16, 1, 'Zeměpis', 'Z', 'Český'),
	(17, 1, 'Informatika', 'I', 'Český'),
	(18, 1, 'Přírodopis', 'Přs', 'Český'),
	(19, 1, 'Anglická Konverzace', 'AK', 'Anglický'),
	(20, 1, 'Německá Konverzace', 'NK', 'Německý');
/*!40000 ALTER TABLE `predmet` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.rodic
DROP TABLE IF EXISTS `rodic`;
CREATE TABLE IF NOT EXISTS `rodic` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `jmeno` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `prijmeni` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `titul` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ulice` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `obec` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `m_cast` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `stat` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `cis_pop` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `psc` int(11) NOT NULL,
  `telefon` varchar(13) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dat_nar` date DEFAULT NULL,
  `image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.rodic: ~2 rows (přibližně)
DELETE FROM `rodic`;
/*!40000 ALTER TABLE `rodic` DISABLE KEYS */;
INSERT INTO `rodic` (`id`, `jmeno`, `prijmeni`, `titul`, `ulice`, `obec`, `m_cast`, `stat`, `cis_pop`, `psc`, `telefon`, `email`, `dat_nar`, `image`) VALUES
	(1, 'Albrecht', 'Vallenstein', 'ing.', 'Růžový', 'Praha', 'Praha 2', 'Česká Republika', '666', 10300, '+420778954267', 'Albrecht@seznam.cz', '1978-03-05', NULL),
	(2, 'Adolf', 'Zelenka', 'Bc.', 'Hnědá', 'Olomouc', 'Oloumouc 9', 'Česká Republika', '598', 23558, '+420623547698', 'Adolf@gmail.com', '2075-11-26', NULL);
/*!40000 ALTER TABLE `rodic` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.rodic_zak
DROP TABLE IF EXISTS `rodic_zak`;
CREATE TABLE IF NOT EXISTS `rodic_zak` (
  `rodic_id` int(11) NOT NULL,
  `zak_id` int(11) NOT NULL,
  PRIMARY KEY (`rodic_id`,`zak_id`),
  KEY `IDX_D3896657417D6937` (`rodic_id`),
  KEY `IDX_D3896657CA0EBDD9` (`zak_id`),
  CONSTRAINT `FK_D3896657417D6937` FOREIGN KEY (`rodic_id`) REFERENCES `rodic` (`id`) ON DELETE CASCADE,
  CONSTRAINT `FK_D3896657CA0EBDD9` FOREIGN KEY (`zak_id`) REFERENCES `zak` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.rodic_zak: ~2 rows (přibližně)
DELETE FROM `rodic_zak`;
/*!40000 ALTER TABLE `rodic_zak` DISABLE KEYS */;
INSERT INTO `rodic_zak` (`rodic_id`, `zak_id`) VALUES
	(1, 1),
	(2, 4);
/*!40000 ALTER TABLE `rodic_zak` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.skola
DROP TABLE IF EXISTS `skola`;
CREATE TABLE IF NOT EXISTS `skola` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nazev` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `stat` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `mesto` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `ulice` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `cis_pop` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,
  `izo` int(11) NOT NULL,
  `red_izo` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `izo_spz` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `delka` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.skola: ~1 rows (přibližně)
DELETE FROM `skola`;
/*!40000 ALTER TABLE `skola` DISABLE KEYS */;
INSERT INTO `skola` (`id`, `nazev`, `stat`, `mesto`, `ulice`, `cis_pop`, `izo`, `red_izo`, `izo_spz`, `delka`) VALUES
	(1, 'Zš Fiktivní škola\r\n', 'Česká replublika', 'Praha', 'Pod příkopy', '189', 12345, '55698', '112158', 9);
/*!40000 ALTER TABLE `skola` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.suplovani
DROP TABLE IF EXISTS `suplovani`;
CREATE TABLE IF NOT EXISTS `suplovani` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ucitel_id` int(11) NOT NULL,
  `absence_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_8BFA4A5E2DFF238F` (`absence_id`),
  KEY `IDX_8BFA4A5E35E6DF29` (`ucitel_id`),
  CONSTRAINT `FK_8BFA4A5E2DFF238F` FOREIGN KEY (`absence_id`) REFERENCES `absence` (`id`),
  CONSTRAINT `FK_8BFA4A5E35E6DF29` FOREIGN KEY (`ucitel_id`) REFERENCES `ucitele` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.suplovani: ~1 rows (přibližně)
DELETE FROM `suplovani`;
/*!40000 ALTER TABLE `suplovani` DISABLE KEYS */;
INSERT INTO `suplovani` (`id`, `ucitel_id`, `absence_id`) VALUES
	(6, 13, 29);
/*!40000 ALTER TABLE `suplovani` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.trida
DROP TABLE IF EXISTS `trida`;
CREATE TABLE IF NOT EXISTS `trida` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nazev` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `skola_id` int(11) DEFAULT NULL,
  `ucebna_id` int(11) DEFAULT NULL,
  `vybrane_predmety_id` int(11) DEFAULT NULL,
  `typ_tridy` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tt` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rocnik` int(11) NOT NULL,
  `obor` varchar(7) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `jaz_o` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_7764D6C7A273BD17` (`ucebna_id`),
  KEY `IDX_7764D6C771B6FA82` (`skola_id`),
  KEY `IDX_7764D6C76F283DC5` (`vybrane_predmety_id`),
  CONSTRAINT `FK_7764D6C76F283DC5` FOREIGN KEY (`vybrane_predmety_id`) REFERENCES `vybrane_predmety` (`id`),
  CONSTRAINT `FK_7764D6C771B6FA82` FOREIGN KEY (`skola_id`) REFERENCES `skola` (`id`),
  CONSTRAINT `FK_7764D6C7A273BD17` FOREIGN KEY (`ucebna_id`) REFERENCES `ucebna` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.trida: ~22 rows (přibližně)
DELETE FROM `trida`;
/*!40000 ALTER TABLE `trida` DISABLE KEYS */;
INSERT INTO `trida` (`id`, `nazev`, `skola_id`, `ucebna_id`, `vybrane_predmety_id`, `typ_tridy`, `tt`, `rocnik`, `obor`, `jaz_o`) VALUES
	(1, '1.A', 1, 1, 1, '', 'B', 1, '1234567', '10'),
	(2, '1.B', 1, NULL, 1, '', 'B', 1, '1234567', '10'),
	(3, '1.C', 1, NULL, 1, '', 'B', 1, '1234567', '10'),
	(4, '2.A', 1, NULL, 2, '', 'B', 2, '1234567', '10'),
	(5, '2.B', 1, NULL, 2, '', 'B', 2, '1234567', '10'),
	(6, '2.C', 1, NULL, 2, '', 'B', 2, '1234567', '10'),
	(7, '3.A', 1, NULL, 2, '', 'B', 3, '1234567', '10'),
	(8, '3.B', 1, NULL, 2, '', 'B', 3, '1234567', '10'),
	(9, '3.C', 1, NULL, 2, '', 'B', 3, '1234567', '10'),
	(10, '4.A', 1, NULL, 4, '', 'B', 4, '1234567', '10'),
	(11, '4.B', 1, NULL, 4, '', 'B', 4, '1234567', '10'),
	(12, '4.C', 1, NULL, 4, '', 'B', 4, '1234567', '10'),
	(13, '5.A', 1, NULL, 4, '', 'B', 5, '1234567', '10'),
	(14, '5.B', 1, NULL, 4, '', 'B', 5, '1234567', '10'),
	(16, '6.A', 1, NULL, 6, '', 'B', 6, '1234567', '10'),
	(17, '6.B', 1, NULL, 6, '', 'B', 6, '1234567', '10'),
	(19, '7.A', 1, NULL, 6, '', 'B', 7, '1234567', '10'),
	(20, '7.B', 1, NULL, 6, '', 'B', 7, '1234567', '10'),
	(22, '8.A', 1, NULL, 6, '', 'B', 8, '1234567', '10'),
	(23, '8.B', 1, NULL, 6, '', 'B', 8, '1234567', '10'),
	(25, '9.A', 1, NULL, 6, '', 'B', 9, '1234567', '10'),
	(26, '9.B', 1, NULL, 6, '', 'B', 9, '1234567', '10');
/*!40000 ALTER TABLE `trida` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.ucebna
DROP TABLE IF EXISTS `ucebna`;
CREATE TABLE IF NOT EXISTS `ucebna` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `skola_id` int(11) DEFAULT NULL,
  `nazev` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `patro` smallint(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_B2DF3FD471B6FA82` (`skola_id`),
  CONSTRAINT `FK_B2DF3FD471B6FA82` FOREIGN KEY (`skola_id`) REFERENCES `skola` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.ucebna: ~5 rows (přibližně)
DELETE FROM `ucebna`;
/*!40000 ALTER TABLE `ucebna` DISABLE KEYS */;
INSERT INTO `ucebna` (`id`, `skola_id`, `nazev`, `patro`) VALUES
	(1, 1, 'SB12', 1),
	(2, 1, 'UB45', 4),
	(3, 1, 'SB23', 2),
	(4, 1, 'SB14', 1),
	(5, 1, 'UB28', 2);
/*!40000 ALTER TABLE `ucebna` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.ucitele
DROP TABLE IF EXISTS `ucitele`;
CREATE TABLE IF NOT EXISTS `ucitele` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `jmeno` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `image` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `trida_id` int(11) DEFAULT NULL,
  `skola_id` int(11) DEFAULT NULL,
  `prijmeni` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `dat_nar` date NOT NULL,
  `stat` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `mesto` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `ulice` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `cis_pop` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,
  `psc` smallint(6) NOT NULL,
  `ucebna_id` int(11) DEFAULT NULL,
  `poznamka` longtext COLLATE utf8mb4_unicode_ci,
  `telefon` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `web` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `asistent_pedagoga` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_67AFC7466F1C825A` (`trida_id`),
  KEY `IDX_67AFC74671B6FA82` (`skola_id`),
  KEY `IDX_67AFC746A273BD17` (`ucebna_id`),
  CONSTRAINT `FK_67AFC7466F1C825A` FOREIGN KEY (`trida_id`) REFERENCES `trida` (`id`),
  CONSTRAINT `FK_67AFC74671B6FA82` FOREIGN KEY (`skola_id`) REFERENCES `skola` (`id`),
  CONSTRAINT `FK_67AFC746A273BD17` FOREIGN KEY (`ucebna_id`) REFERENCES `ucebna` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.ucitele: ~5 rows (přibližně)
DELETE FROM `ucitele`;
/*!40000 ALTER TABLE `ucitele` DISABLE KEYS */;
INSERT INTO `ucitele` (`id`, `jmeno`, `image`, `trida_id`, `skola_id`, `prijmeni`, `dat_nar`, `stat`, `mesto`, `ulice`, `cis_pop`, `psc`, `ucebna_id`, `poznamka`, `telefon`, `email`, `web`, `asistent_pedagoga`) VALUES
	(1, 'Admin', NULL, NULL, 1, 'Admin', '2020-03-09', 'n/a', 'n/a', 'n/a', '0000', 0, NULL, NULL, NULL, NULL, NULL, 0),
	(11, 'Alfons', NULL, 6, 1, 'Kaktus', '1963-07-19', 'Česká republika', 'Praha', 'Červená', '445', 11500, 2, NULL, '+420778425693', 'Kaktus@skola.cz', NULL, 0),
	(13, 'Lucie', NULL, 2, 1, 'Novotná', '1999-05-16', 'Česká republika', 'Brno', 'Růžová', '479', 12900, 1, NULL, '+123456789', 'Lucie@seznam.cz', 'Lucie.com', 1),
	(14, 'Jarka', NULL, 10, 1, 'Opičková', '1950-04-28', 'Česká republika', 'Jílové u Prahy', 'Nad Oblohou', '456', 15900, 1, NULL, NULL, NULL, NULL, 0),
	(16, 'Andrej', NULL, 1, 1, 'Jamrich', '1997-02-04', 'Slovenská Republika', 'Bánská Bystrica', 'Hnědá', '154', 18500, 1, NULL, NULL, NULL, NULL, 0);
/*!40000 ALTER TABLE `ucitele` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.user
DROP TABLE IF EXISTS `user`;
CREATE TABLE IF NOT EXISTS `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(180) COLLATE utf8mb4_unicode_ci NOT NULL,
  `roles` longtext COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '(DC2Type:json)',
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `ucitel_id` int(11) DEFAULT NULL,
  `zak_id` int(11) DEFAULT NULL,
  `rodic_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_8D93D649F85E0677` (`username`),
  UNIQUE KEY `UNIQ_8D93D64935E6DF29` (`ucitel_id`),
  UNIQUE KEY `UNIQ_8D93D649CA0EBDD9` (`zak_id`),
  UNIQUE KEY `UNIQ_8D93D649417D6937` (`rodic_id`),
  CONSTRAINT `FK_8D93D64935E6DF29` FOREIGN KEY (`ucitel_id`) REFERENCES `ucitele` (`id`),
  CONSTRAINT `FK_8D93D649417D6937` FOREIGN KEY (`rodic_id`) REFERENCES `rodic` (`id`),
  CONSTRAINT `FK_8D93D649CA0EBDD9` FOREIGN KEY (`zak_id`) REFERENCES `zak` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.user: ~4 rows (přibližně)
DELETE FROM `user`;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` (`id`, `username`, `roles`, `password`, `ucitel_id`, `zak_id`, `rodic_id`) VALUES
	(2, 'test', '["ROLE_TEACHER"]', '$argon2id$v=19$m=65536,t=4,p=1$a0xqSXNRcU5Jb0dROXNOOA$GVZxteSd+WST0afO/RyYdv625mi/sKucHOmYgUFdNNs', 16, NULL, NULL),
	(3, 'test2', '["ROLE_STUDENT"]', '$argon2id$v=19$m=65536,t=4,p=1$VWtndWtaeE0ueTJJbEtnMQ$I0LWaPDfGoTxG69NKN5QsrrQfm8+SL8mHCPtkZ1uzdk', NULL, 1, NULL),
	(4, 'Admin', '["ROLE_ADMIN"]', '$argon2id$v=19$m=65536,t=4,p=1$Vy96ZWpVbnY1RFpmZjMvaQ$DrKgNUIy5W8CLS+VJ0179n9n0BLcOzIC49HVcCyIgbo', 1, NULL, NULL),
	(5, 'test3', '["ROLE_PARENT"]', '$argon2id$v=19$m=65536,t=4,p=1$RzFSbi4wc25XSVRGRTRFUg$mI8LeuMAeISBUQNAxqEnx7XyQ7RoP8K4w/om6F9vzmo', NULL, NULL, 1);
/*!40000 ALTER TABLE `user` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.vybrane_predmety
DROP TABLE IF EXISTS `vybrane_predmety`;
CREATE TABLE IF NOT EXISTS `vybrane_predmety` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.vybrane_predmety: ~4 rows (přibližně)
DELETE FROM `vybrane_predmety`;
/*!40000 ALTER TABLE `vybrane_predmety` DISABLE KEYS */;
INSERT INTO `vybrane_predmety` (`id`) VALUES
	(1),
	(2),
	(4),
	(6);
/*!40000 ALTER TABLE `vybrane_predmety` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.vybrane_predmety_predmet
DROP TABLE IF EXISTS `vybrane_predmety_predmet`;
CREATE TABLE IF NOT EXISTS `vybrane_predmety_predmet` (
  `vybrane_predmety_id` int(11) NOT NULL,
  `predmet_id` int(11) NOT NULL,
  PRIMARY KEY (`vybrane_predmety_id`,`predmet_id`),
  KEY `IDX_FC1F02BC6F283DC5` (`vybrane_predmety_id`),
  KEY `IDX_FC1F02BCB4810FC4` (`predmet_id`),
  CONSTRAINT `FK_FC1F02BC6F283DC5` FOREIGN KEY (`vybrane_predmety_id`) REFERENCES `vybrane_predmety` (`id`) ON DELETE CASCADE,
  CONSTRAINT `FK_FC1F02BCB4810FC4` FOREIGN KEY (`predmet_id`) REFERENCES `predmet` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.vybrane_predmety_predmet: ~29 rows (přibližně)
DELETE FROM `vybrane_predmety_predmet`;
/*!40000 ALTER TABLE `vybrane_predmety_predmet` DISABLE KEYS */;
INSERT INTO `vybrane_predmety_predmet` (`vybrane_predmety_id`, `predmet_id`) VALUES
	(1, 1),
	(1, 2),
	(1, 3),
	(1, 4),
	(1, 5),
	(1, 6),
	(1, 7),
	(1, 8),
	(2, 1),
	(2, 2),
	(2, 3),
	(2, 4),
	(4, 1),
	(4, 2),
	(4, 4),
	(4, 9),
	(4, 10),
	(6, 1),
	(6, 2),
	(6, 4),
	(6, 5),
	(6, 7),
	(6, 8),
	(6, 11),
	(6, 12),
	(6, 13),
	(6, 14),
	(6, 15),
	(6, 18);
/*!40000 ALTER TABLE `vybrane_predmety_predmet` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.zak
DROP TABLE IF EXISTS `zak`;
CREATE TABLE IF NOT EXISTS `zak` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `trida_id` int(11) NOT NULL,
  `skola_id` int(11) DEFAULT NULL,
  `jmeno` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `prijmeni` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `dat_nar` date NOT NULL,
  `image` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `stat` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `okres` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `ulice` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `cis_pop` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,
  `psc` smallint(6) NOT NULL,
  `poznamka` longtext COLLATE utf8mb4_unicode_ci,
  `tel` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rod_cis` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  `pohlavi` tinyint(1) NOT NULL,
  `obcanstvi` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL,
  `op` int(11) DEFAULT NULL,
  `pas` int(11) DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `m_cast` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pred_skol` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dat_zah` date NOT NULL,
  `dat_uk` date DEFAULT NULL,
  `zd_poj` int(11) DEFAULT NULL,
  `nadani` int(11) DEFAULT NULL,
  `ind_stud_plan` int(11) NOT NULL,
  `znevyhodneni` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `upr_vzd_program` int(11) DEFAULT NULL,
  `odl_kult_prostredi` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `prodl_delka_vzd` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `uprava_vyst_vzdel` tinyint(1) DEFAULT NULL,
  `dat_vyd_doporuc` date DEFAULT NULL,
  `dat_konce_doporuc` date DEFAULT NULL,
  `norm_fin_narocnost` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `forma_poriz_pomucky` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fin_narocnost` tinyint(1) DEFAULT NULL,
  `dat_zah_po` date DEFAULT NULL,
  `dat_uk_po` date DEFAULT NULL,
  `kv_st_obc` int(11) NOT NULL,
  `zah_doc` varchar(2) COLLATE utf8mb4_unicode_ci NOT NULL,
  `kod_uk` varchar(2) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `prizn` int(11) DEFAULT NULL,
  `zpusob` int(11) NOT NULL,
  `fin` int(11) NOT NULL,
  `dat_zmen` date DEFAULT NULL,
  `kod_zmen` int(11) DEFAULT NULL,
  `kat_znev` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pspo` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_A1D6A26F1C825A` (`trida_id`),
  KEY `IDX_A1D6A271B6FA82` (`skola_id`),
  CONSTRAINT `FK_A1D6A26F1C825A` FOREIGN KEY (`trida_id`) REFERENCES `trida` (`id`),
  CONSTRAINT `FK_A1D6A271B6FA82` FOREIGN KEY (`skola_id`) REFERENCES `skola` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.zak: ~4 rows (přibližně)
DELETE FROM `zak`;
/*!40000 ALTER TABLE `zak` DISABLE KEYS */;
INSERT INTO `zak` (`id`, `trida_id`, `skola_id`, `jmeno`, `prijmeni`, `dat_nar`, `image`, `stat`, `okres`, `ulice`, `cis_pop`, `psc`, `poznamka`, `tel`, `rod_cis`, `pohlavi`, `obcanstvi`, `op`, `pas`, `email`, `m_cast`, `pred_skol`, `dat_zah`, `dat_uk`, `zd_poj`, `nadani`, `ind_stud_plan`, `znevyhodneni`, `upr_vzd_program`, `odl_kult_prostredi`, `prodl_delka_vzd`, `uprava_vyst_vzdel`, `dat_vyd_doporuc`, `dat_konce_doporuc`, `norm_fin_narocnost`, `forma_poriz_pomucky`, `fin_narocnost`, `dat_zah_po`, `dat_uk_po`, `kv_st_obc`, `zah_doc`, `kod_uk`, `prizn`, `zpusob`, `fin`, `dat_zmen`, `kod_zmen`, `kat_znev`, `pspo`) VALUES
	(1, 1, 1, 'Matěj', 'Němec', '2011-05-07', NULL, 'Česká Republika', 'Praha', 'Černá', '55', 11200, 'Žák nemůže jíst mléčné výrobky  a maso. Trpí lehkou formou autismu', '+420774225136', '456546578', 1, '203', NULL, NULL, NULL, 'Praha 5', NULL, '2020-09-01', NULL, 111, 1, 0, '07T00Z0', 0, '0', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 3, '1', NULL, 1, 11, 1, NULL, NULL, '0', 1),
	(2, 10, 1, 'Daniel', 'Kamený', '2009-04-05', NULL, 'Česká Republika', 'Praha', 'Modrá', '670', 29100, NULL, '+420893167820', '', 1, '203', NULL, NULL, NULL, 'Praha 4', NULL, '2018-09-01', NULL, 452, NULL, 0, '07T00Z0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 3, '', NULL, 1, 11, 1, NULL, NULL, '0', 2),
	(3, 2, 1, 'Andrej', 'Krkokodýl', '2011-02-02', NULL, 'Česká Republika', 'Praha', 'Zelená', '554', 10900, NULL, NULL, '965225498', 1, '203', NULL, NULL, NULL, 'Praha 10', NULL, '2020-09-01', NULL, 102, NULL, 0, '07T00Z0', 0, '0', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 3, '', NULL, 1, 11, 1, NULL, NULL, '0', 1),
	(4, 6, 1, 'Aneta', 'Fialová', '2010-04-05', NULL, 'Česká Republika', 'Praha', 'Modrá', '335', 32767, NULL, NULL, '1235586952', 2, '203', NULL, NULL, NULL, 'Praha 8', NULL, '2020-09-01', NULL, 333, NULL, 0, '07T00Z0', 0, '0', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 3, '', NULL, 1, 11, 1, NULL, NULL, '0', 3);
/*!40000 ALTER TABLE `zak` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.znamka
DROP TABLE IF EXISTS `znamka`;
CREATE TABLE IF NOT EXISTS `znamka` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `zak_id` int(11) NOT NULL,
  `predmet_id` int(11) NOT NULL,
  `ucitel_id` int(11) NOT NULL,
  `hodnota` smallint(6) DEFAULT NULL,
  `poznamka` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `datum` date NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_42506D9FCA0EBDD9` (`zak_id`),
  KEY `IDX_42506D9FB4810FC4` (`predmet_id`),
  KEY `IDX_42506D9F35E6DF29` (`ucitel_id`),
  CONSTRAINT `FK_42506D9F35E6DF29` FOREIGN KEY (`ucitel_id`) REFERENCES `ucitele` (`id`),
  CONSTRAINT `FK_42506D9FB4810FC4` FOREIGN KEY (`predmet_id`) REFERENCES `predmet` (`id`),
  CONSTRAINT `FK_42506D9FCA0EBDD9` FOREIGN KEY (`zak_id`) REFERENCES `zak` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.znamka: ~9 rows (přibližně)
DELETE FROM `znamka`;
/*!40000 ALTER TABLE `znamka` DISABLE KEYS */;
INSERT INTO `znamka` (`id`, `zak_id`, `predmet_id`, `ucitel_id`, `hodnota`, `poznamka`, `datum`) VALUES
	(8, 1, 1, 16, 2, 'Test', '2020-03-09'),
	(9, 1, 2, 16, 3, NULL, '2020-03-09'),
	(10, 2, 1, 16, 1, NULL, '2020-03-09'),
	(11, 2, 4, 11, 2, NULL, '2020-03-09'),
	(12, 1, 1, 14, 1, NULL, '2020-03-09'),
	(13, 2, 2, 13, 2, NULL, '2020-03-09'),
	(14, 2, 1, 16, 3, NULL, '2020-03-09'),
	(15, 2, 1, 16, 4, NULL, '2020-03-09'),
	(16, 3, 1, 11, 1, 'Zkoušení', '2020-11-20');
/*!40000 ALTER TABLE `znamka` ENABLE KEYS */;

-- Exportování struktury pro tabulka thesis.zprava
DROP TABLE IF EXISTS `zprava`;
CREATE TABLE IF NOT EXISTS `zprava` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `odesilatel_id` int(11) DEFAULT NULL,
  `prijemce_id` int(11) DEFAULT NULL,
  `text` longtext COLLATE utf8mb4_unicode_ci,
  `precteno` tinyint(1) DEFAULT NULL,
  `predmet` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dat_odesl` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_295A2975428A3C56` (`odesilatel_id`),
  KEY `IDX_295A2975F07C547E` (`prijemce_id`),
  CONSTRAINT `FK_295A2975428A3C56` FOREIGN KEY (`odesilatel_id`) REFERENCES `user` (`id`),
  CONSTRAINT `FK_295A2975F07C547E` FOREIGN KEY (`prijemce_id`) REFERENCES `user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Exportování dat pro tabulku thesis.zprava: ~4 rows (přibližně)
DELETE FROM `zprava`;
/*!40000 ALTER TABLE `zprava` DISABLE KEYS */;
INSERT INTO `zprava` (`id`, `odesilatel_id`, `prijemce_id`, `text`, `precteno`, `predmet`, `dat_odesl`) VALUES
	(1, 4, 2, 'test test test test', 1, 'zkouska', '2020-11-29'),
	(2, 2, 4, 'Když máš v chalupě orchestrión,\r\nNevadí, že do ní fičí,', 1, 'Testíček', '2020-11-29'),
	(3, 4, 4, 'Školní systém nám funguje opravdu moc hezky', 1, 'Zkouška', '2020-11-29'),
	(4, 4, 5, 'Mám fakt rád sýr, co vy ?', 1, 'Sýr', '2020-11-29');
/*!40000 ALTER TABLE `zprava` ENABLE KEYS */;

/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
