-- phpMyAdmin SQL Dump
-- version 2.6.4-pl4
-- http://www.phpmyadmin.net
-- 
-- Počítač: localhost
-- Vygenerováno: Pondělí 12. května 2008, 19:08
-- Verze MySQL: 5.0.24
-- Verze PHP: 5.2.4
-- 
-- Databáze: `rizika`
-- 

-- --------------------------------------------------------

-- 
-- Struktura tabulky `component`
-- 

CREATE TABLE `component` (
  `id` int(4) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `location` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;

-- 
-- Vypisuji data pro tabulku `component`
-- 

INSERT INTO `component` (`id`, `name`, `location`) VALUES (1, 'Asynchronní motor', 'přední prostor');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (2, 'Řemenový převod', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (3, 'Vřeteno', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (4, 'Hydraulický válec', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (5, 'Hydraulický agregát', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (6, 'Rozvod kapaliny', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (7, 'Rozvod stlačeného vzduchu', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (8, 'Sklíčidlo', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (9, 'Čelisti', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (10, 'Obrobek', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (11, 'Třísky', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (12, 'Nástroj', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (13, 'KŠM', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (14, 'Saně osy + odměřování pravítko', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (15, 'Servomotor', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (16, 'Nástrojová hlava', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (17, 'Koník', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (18, 'Dopravník třísek + nádrž Kř', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (19, 'Rozvod řezné kapaliny', '');
INSERT INTO `component` (`id`, `name`, `location`) VALUES (20, 'Další komponenta', '');

-- --------------------------------------------------------

-- 
-- Struktura tabulky `component_danger_variant`
-- 

CREATE TABLE `component_danger_variant` (
  `component_id` int(4) unsigned NOT NULL auto_increment,
  `danger_variant_id` int(4) unsigned NOT NULL,
  PRIMARY KEY  (`component_id`,`danger_variant_id`)
) TYPE=InnoDB AUTO_INCREMENT=13;

-- 
-- Vypisuji data pro tabulku `component_danger_variant`
-- 

INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (1, 1);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (1, 2);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (1, 3);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (1, 7);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (1, 8);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (1, 9);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (2, 2);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (2, 3);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (2, 4);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (2, 5);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (3, 1);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (3, 2);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (4, 1);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (4, 2);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (5, 8);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (5, 9);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (9, 1);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (9, 2);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (9, 6);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (9, 7);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (9, 9);
INSERT INTO `component_danger_variant` (`component_id`, `danger_variant_id`) VALUES (12, 1);

-- --------------------------------------------------------

-- 
-- Struktura tabulky `danger_group`
-- 

CREATE TABLE `danger_group` (
  `id` int(2) unsigned NOT NULL auto_increment,
  `name` varchar(64) NOT NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;

-- 
-- Vypisuji data pro tabulku `danger_group`
-- 

INSERT INTO `danger_group` (`id`, `name`) VALUES (1, 'mechanické');
INSERT INTO `danger_group` (`id`, `name`) VALUES (2, 'elektrické');
INSERT INTO `danger_group` (`id`, `name`) VALUES (3, 'tepelné');
INSERT INTO `danger_group` (`id`, `name`) VALUES (4, 'nebezpečí vytvářená hlukem');
INSERT INTO `danger_group` (`id`, `name`) VALUES (5, 'n/a 5');
INSERT INTO `danger_group` (`id`, `name`) VALUES (6, 'n/a 6');
INSERT INTO `danger_group` (`id`, `name`) VALUES (7, 'nebezpečí vytvářená materiály a látkami');
INSERT INTO `danger_group` (`id`, `name`) VALUES (8, 'zanedbání ergonomických zásad');
INSERT INTO `danger_group` (`id`, `name`) VALUES (9, 'n/a 9');
INSERT INTO `danger_group` (`id`, `name`) VALUES (10, 'neočekávané spuštění');
INSERT INTO `danger_group` (`id`, `name`) VALUES (11, 'n/a 11');
INSERT INTO `danger_group` (`id`, `name`) VALUES (12, 'n/a 12');
INSERT INTO `danger_group` (`id`, `name`) VALUES (13, 'n/a 13');
INSERT INTO `danger_group` (`id`, `name`) VALUES (14, 'n/a 14');
INSERT INTO `danger_group` (`id`, `name`) VALUES (15, 'chybná montáž');
INSERT INTO `danger_group` (`id`, `name`) VALUES (16, 'roztržení během provozu');
INSERT INTO `danger_group` (`id`, `name`) VALUES (17, 'vymrštění předmětů nebo vystříknutí kapalin');
INSERT INTO `danger_group` (`id`, `name`) VALUES (18, 'n/a 18');
INSERT INTO `danger_group` (`id`, `name`) VALUES (19, 'nebezpečí uklouznutí ');
INSERT INTO `danger_group` (`id`, `name`) VALUES (20, 'Beno');

-- --------------------------------------------------------

-- 
-- Struktura tabulky `danger_type`
-- 

CREATE TABLE `danger_type` (
  `id` int(4) unsigned NOT NULL auto_increment,
  `danger_group_id` int(2) NOT NULL,
  `code` varchar(16) NOT NULL,
  `description` varchar(255) NOT NULL,
  `column_cast2_a1_1995` varchar(255) NOT NULL,
  `column_cast1_r1991` varchar(255) NOT NULL,
  `column_cast2_r1991` varchar(255) NOT NULL,
  `column_csn_en_iso_12100_1_2003` varchar(255) NOT NULL,
  `column_csn_en_iso_12100_2_2003` varchar(255) NOT NULL,
  `column_normy_typu_b` varchar(255) NOT NULL,
  `column_clanky_csn_en_12415_2001` varchar(255) NOT NULL,
  `situation_description` text NOT NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;

--
-- Vypisuji data pro tabulku `danger_type`
-- 

INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (1, 1, '1.1', 'Nebezpe?í stla?ení', '', '', '', '', '', '', '', 'ccccccccccccccccccccccccccc');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (2, 1, '1.2', 'Nebezpečí střihu', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (3, 1, '1.3', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (4, 1, '1.4', 'Nebezpečí 1.4', '0', '1', '2', '3', '4', '5', '6', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (5, 1, '1.5', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (6, 1, '1.6', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (7, 1, '1.7', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (8, 1, '1.8', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (9, 1, '1.9', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (10, 2, '2.1', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (11, 2, '2.2', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (12, 3, '3.1', 'Oheň', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (13, 4, '4.1', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (14, 7, '7.1', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (15, 7, '7.2', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (16, 8, '8.1', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (17, 8, '8.2', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (18, 8, '8.3', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (19, 10, '10.1', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (20, 10, '10.2', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (21, 10, '10.3', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (22, 16, '16', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (23, 17, '17', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (24, 19, '19', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (25, 15, '15', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (26, 14, '14', 'Konkrétní popis nebezpečí', '', '', '', '', '', '', '', '');
INSERT INTO `danger_type` (`id`, `danger_group_id`, `code`, `description`, `column_cast2_a1_1995`, `column_cast1_r1991`, `column_cast2_r1991`, `column_csn_en_iso_12100_1_2003`, `column_csn_en_iso_12100_2_2003`, `column_normy_typu_b`, `column_clanky_csn_en_12415_2001`, `situation_description`) VALUES (27, 3, '123', 'hallleluja', '', '', '', '', '', '', '', '');

-- --------------------------------------------------------

-- 
-- Struktura tabulky `danger_variant`
-- 

CREATE TABLE `danger_variant` (
  `id` int(6) unsigned NOT NULL auto_increment,
  `danger_type_id` int(4) unsigned NOT NULL,
  `description` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

-- 
-- Vypisuji data pro tabulku `danger_variant`
-- 

INSERT INTO `danger_variant` (`id`, `danger_type_id`, `description`) VALUES (1, 1, 'Nebezpečí stlačení při manipulaci se strojem nebo jeho částmi.');
INSERT INTO `danger_variant` (`id`, `danger_type_id`, `description`) VALUES (2, 1, 'Nebezpečí stlačení při manipulaci s polotovary a obrobky.');
INSERT INTO `danger_variant` (`id`, `danger_type_id`, `description`) VALUES (3, 1, 'Nebezpečí stlačení při upínání polotovaru pomocí sklíčidla.');
INSERT INTO `danger_variant` (`id`, `danger_type_id`, `description`) VALUES (4, 4, '1.4 - 1');
INSERT INTO `danger_variant` (`id`, `danger_type_id`, `description`) VALUES (5, 4, '1.4 - 2 varianta');
INSERT INTO `danger_variant` (`id`, `danger_type_id`, `description`) VALUES (6, 4, '1.4 - 3');
INSERT INTO `danger_variant` (`id`, `danger_type_id`, `description`) VALUES (7, 12, 'Spálení');
INSERT INTO `danger_variant` (`id`, `danger_type_id`, `description`) VALUES (8, 12, 'Požár');
INSERT INTO `danger_variant` (`id`, `danger_type_id`, `description`) VALUES (9, 12, 'Roztavení');

-- --------------------------------------------------------

-- 
-- Struktura tabulky `history`
-- 

CREATE TABLE `history` (
  `id` int(6) unsigned NOT NULL auto_increment,
  `danger_variant_id` int(4) unsigned NOT NULL,
  `area` varchar(255) NOT NULL,
  `persons` varchar(255) NOT NULL,
  `event` text NOT NULL,
  `step1` text NOT NULL,
  `step2` text NOT NULL,
  `step3` text NOT NULL,
  `s0` int(4) unsigned NOT NULL,
  `s1` int(4) unsigned NOT NULL,
  `s2` int(4) unsigned NOT NULL,
  `s3` int(4) unsigned NOT NULL,
  `a0` int(4) unsigned NOT NULL,
  `a1` int(4) unsigned NOT NULL,
  `a2` int(4) unsigned NOT NULL,
  `a3` int(4) unsigned NOT NULL,
  `e0` int(4) unsigned NOT NULL,
  `e1` int(4) unsigned NOT NULL,
  `e2` int(4) unsigned NOT NULL,
  `e3` int(4) unsigned NOT NULL,
  `w0` int(4) unsigned NOT NULL,
  `w1` int(4) unsigned NOT NULL,
  `w2` int(4) unsigned NOT NULL,
  `w3` int(4) unsigned NOT NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

-- 
-- Vypisuji data pro tabulku `history`
-- 

INSERT INTO `history` (`id`, `danger_variant_id`, `area`, `persons`, `event`, `step1`, `step2`, `step3`, `s0`, `s1`, `s2`, `s3`, `a0`, `a1`, `a2`, `a3`, `e0`, `e1`, `e2`, `e3`, `w0`, `w1`, `w2`, `w3`) VALUES (1, 3, 'Neco', '','cccccccccccccccccccccccccccccc', 'aůjfůaljfaůlsdjfaůlsfjů', 'ůaldkjfaůljfaůlskfjaůlkj', 'ůlkjadůslkfjoeialkdmooooo', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `history` (`id`, `danger_variant_id`, `area`, `persons`, `event`, `step1`, `step2`, `step3`, `s0`, `s1`, `s2`, `s3`, `a0`, `a1`, `a2`, `a3`, `e0`, `e1`, `e2`, `e3`, `w0`, `w1`, `w2`, `w3`) VALUES (2, 0, '', '', '', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `history` (`id`, `danger_variant_id`, `area`, `persons`, `event`, `step1`, `step2`, `step3`, `s0`, `s1`, `s2`, `s3`, `a0`, `a1`, `a2`, `a3`, `e0`, `e1`, `e2`, `e3`, `w0`, `w1`, `w2`, `w3`) VALUES (3, 2, 'nic', '', 'haleluja', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `history` (`id`, `danger_variant_id`, `area`, `persons`, `event`, `step1`, `step2`, `step3`, `s0`, `s1`, `s2`, `s3`, `a0`, `a1`, `a2`, `a3`, `e0`, `e1`, `e2`, `e3`, `w0`, `w1`, `w2`, `w3`) VALUES (4, 1, '', '', '', '', '', '', 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `history` (`id`, `danger_variant_id`, `area`, `persons`, `event`, `step1`, `step2`, `step3`, `s0`, `s1`, `s2`, `s3`, `a0`, `a1`, `a2`, `a3`, `e0`, `e1`, `e2`, `e3`, `w0`, `w1`, `w2`, `w3`) VALUES (5, 6, 'ASDFASDFASD', '', 'ASDFASDFASDFA', 'ASDASSADFSDFASDFASD ASDF ASDA SDFASD ASDF ASDF ASDF ASDF ', '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `history` (`id`, `danger_variant_id`, `area`, `persons`, `event`, `step1`, `step2`, `step3`, `s0`, `s1`, `s2`, `s3`, `a0`, `a1`, `a2`, `a3`, `e0`, `e1`, `e2`, `e3`, `w0`, `w1`, `w2`, `w3`) VALUES (6, 9, 'RRRRRRRRRRRRRRRRRRR', '', 'RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR', 'RRRRRRRRRRRRRRRRRRRRRRRRQWERQWER', '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);

-- --------------------------------------------------------

-- 
-- Struktura tabulky `phase`
-- 

CREATE TABLE `phase` (
  `stage_id` int(4) unsigned NOT NULL,
  `phase_name_id` int(4) unsigned NOT NULL,
  PRIMARY KEY  (`stage_id`,`phase_name_id`)
) TYPE=InnoDB;

-- 
-- Vypisuji data pro tabulku `phase`
-- 

INSERT INTO `phase` (`stage_id`, `phase_name_id`) VALUES (2, 1);
INSERT INTO `phase` (`stage_id`, `phase_name_id`) VALUES (2, 2);
INSERT INTO `phase` (`stage_id`, `phase_name_id`) VALUES (2, 3);
INSERT INTO `phase` (`stage_id`, `phase_name_id`) VALUES (3, 4);
INSERT INTO `phase` (`stage_id`, `phase_name_id`) VALUES (3, 5);
INSERT INTO `phase` (`stage_id`, `phase_name_id`) VALUES (3, 6);
INSERT INTO `phase` (`stage_id`, `phase_name_id`) VALUES (3, 7);
INSERT INTO `phase` (`stage_id`, `phase_name_id`) VALUES (3, 8);
INSERT INTO `phase` (`stage_id`, `phase_name_id`) VALUES (3, 9);
INSERT INTO `phase` (`stage_id`, `phase_name_id`) VALUES (3, 10);

-- --------------------------------------------------------

-- 
-- Struktura tabulky `phase_name`
-- 

CREATE TABLE `phase_name` (
  `id` int(3) unsigned NOT NULL auto_increment,
  `name` varchar(128) NOT NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;

-- 
-- Vypisuji data pro tabulku `phase_name`
-- 

INSERT INTO `phase_name` (`id`, `name`) VALUES (1, 'Vykládka stroje, zvedání stroje');
INSERT INTO `phase_name` (`id`, `name`) VALUES (2, 'Přemisťování stroje');
INSERT INTO `phase_name` (`id`, `name`) VALUES (3, 'Usazování stroje');
INSERT INTO `phase_name` (`id`, `name`) VALUES (4, 'Plnění provozní kapalinou');
INSERT INTO `phase_name` (`id`, `name`) VALUES (5, 'Odvzdušňování rozvodů hydraulického systému');
INSERT INTO `phase_name` (`id`, `name`) VALUES (6, 'Instalace nástroje');
INSERT INTO `phase_name` (`id`, `name`) VALUES (7, 'Seřízení přetáčení revolverové nástrojové hlavy');
INSERT INTO `phase_name` (`id`, `name`) VALUES (8, 'Seřízení manipulátoru');
INSERT INTO `phase_name` (`id`, `name`) VALUES (9, 'Volba seřizovacího režimu');
INSERT INTO `phase_name` (`id`, `name`) VALUES (10, 'Montáž komponent');

-- --------------------------------------------------------

-- 
-- Struktura tabulky `stage`
-- 

CREATE TABLE `stage` (
  `id` int(4) unsigned NOT NULL auto_increment,
  `description` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Vypisuji data pro tabulku `stage`
-- 

INSERT INTO `stage` (`id`, `description`) VALUES (1, 'Během výroby');
INSERT INTO `stage` (`id`, `description`) VALUES (2, 'Během přepravy, montáže a instalace');
INSERT INTO `stage` (`id`, `description`) VALUES (3, 'Během uvádění do provozu');
INSERT INTO `stage` (`id`, `description`) VALUES (4, 'Během používání');
INSERT INTO `stage` (`id`, `description`) VALUES (5, 'Během vyřazonvání z provozu');