CREATE TABLE IF NOT EXISTS `phs_cis_olh` (
`KOD`  SMALLINT NOT NULL, 
`POPIS`  VARCHAR(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




CREATE TABLE IF NOT EXISTS `phs_cisschu` (
`SCHU_KOD`  FLOAT NOT NULL, 
`SCHU_NAZEV`  VARCHAR(50) NOT NULL, 
`SCHU_SML`  VARCHAR(50) NOT NULL, 
`SCHU_POPIS`  VARCHAR(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




CREATE TABLE IF NOT EXISTS `phs_katastry` (
`Kod`  FLOAT NOT NULL, 
`POPIS`  VARCHAR(20) NOT NULL, 
`ORP`  INT NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `phs_majetky` (
`MAJ_KOD`  FLOAT NOT NULL, 
`MAJ_DRUH`  FLOAT NOT NULL, 
`OLH`  FLOAT NOT NULL, 
`MAJ_NAZ`  VARCHAR(80) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `phs_majetky` (`MAJ_KOD`,`MAJ_DRUH`,`OLH`,`MAJ_NAZ`) VALUES
('95001','7','1','Pan Sternberg Zdeněk');


CREATE TABLE IF NOT EXISTS `phs_mel_drev` (
`Cislo_HS`  FLOAT NOT NULL, 
`Mel_dr1`  VARCHAR(3) NOT NULL, 
`Mel_dr2`  VARCHAR(3) NOT NULL, 
`Mel_dr3`  VARCHAR(3) NOT NULL, 
`Mel_dr4`  VARCHAR(3) NOT NULL, 
`Mel_dr5`  VARCHAR(3) NOT NULL, 
`Mel_dr6`  VARCHAR(3) NOT NULL, 
`Mel_dr7`  VARCHAR(3) NOT NULL, 
`Mel_dr8`  VARCHAR(3) NOT NULL, 
`Mel_dr9`  VARCHAR(3) NOT NULL, 
`Mel_dr10`  VARCHAR(3) NOT NULL, 
`MZD`  SMALLINT NOT NULL, 
`LT`  VARCHAR(80) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




CREATE TABLE IF NOT EXISTS `phs_meldrvyhl` (
`oHS`  INT NOT NULL, 
`LT`  VARCHAR(255) NOT NULL, 
`hDR`  VARCHAR(3) NOT NULL, 
`p`  INT NOT NULL, 
`DR`  VARCHAR(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `phs_meldrvyhl` (`oHS`,`LT`,`hDR`,`p`,`DR`) VALUES
('13','0M,0K,0C,0Q,0P,0O,','','5',',BK,DB,DBZ,JR,JD,DBC,BR,'),
('13','1M,','','15',',DB,DBZ,BR,HB,LP,LPV,JD,DBC,'),
('13','0N,','','10',',BK,BR,DB,DBZ,JD,'),
('19','1L,2L,','','15',',LP,LPV,JV,KL,JL,JLV,JLH,HB,BB,BRK,DB,DBZ,TP,ORC,'),
('19','1U,','','15',',JL,JLV,JLH,LP,LPV,OL,VR,OS,DB,DBZ,TP,'),
('19','3U,','','15',',BK,JV,KL,JL,JLV,JLH,LP,LPV,JD,OL,DB,DBZ,JS,'),
('21','1N,2N,1C,2C,3N4,4N4,2M9,2K9,3M9,4M9,','','30',',BK,DB,DBZ,LP,LPV,HB,JD,BR,'),
('21','1N,2N,1C,2C,3N4,4N4,2M9,2K9,3M9,4M9,','DB','30',',BK,LP,LPV,HB,BR,JD,DB,DBZ,'),
('21','1A,2A,2S9,2B9,2D9,','','30',',BK,DB,DBZ,LP,LPV,JV,KL,HB,JS,JD,BRK,BB,TS,'),
('21','1A,2A,2S9,2B9,2D9,','DB','30',',BK,LP,LPV,JV,KL,HB,JS,JL,JLV,JLH,JD,BRK,BB,TS,DB,DBZ,'),
('23','1K,2K,1I,2I,2M,3M,4M,1S0,1S1,1S6,2S6,1S7,2S7,2S0,3K0,3K5,3I5,','','25',',BK,DB,DBZ,LP,LPV,HB,JD,BR,DG,'),
('23','1K,2K,1I,2I,2M,3M,4M,1S0,1S1,1S6,2S6,1S7,2S7,2S0,3K0,3K5,3I5,','DB','25',',BK,LP,LPV,HB,JD,DB,DBZ,'),
('25','1H,2H,1B,2B,1D,2D,1W,2W,1V,2V,1O,2O,1S,2S,','','20',',BK,LP,LPV,HB,JV,KL,JS,JL,JLV,JLH,JD,JDO,TR,BRK,BB,DB,DBZ,'),
('27','1P,2P,1Q,2Q,3Q,4Q,3P,5Q,','','20',',BK,DB,DBZ,BR,JD,OS,'),
('27','1P,2P,1Q,2Q,3Q,4Q,3P,5Q,','DB','20',',BK,DB,DBZ,BR,JD,OS,'),
('29','1T9,','','65',',DB,DBZ,BR,OL,'),
('29','1T,','','75',',DB,DBZ,BR,OL,'),
('29','1G,','','90',',OL,VR,'),
('29','3L,5L,','','70',',JV,KL,OL,JS,');
INSERT INTO `phs_meldrvyhl` (`oHS`,`LT`,`hDR`,`p`,`DR`) VALUES
('31','3C,4C,5C,','','30',',BK,DB,DBZ,LP,LPV,JD,HB,JV,KL,BRK,TR,'),
('31','3C,4C,5C,','BO','30',',BK,DB,DBZ,LP,LPV,JD,HB,'),
('31','3A3,3A9,4A9,5A9,3W9,3W4,4W4,4W9,','','30',',BK,DB,DBZ,LP,LPV,JV,KL,JS,JL,JLV,JLH,JD,HB,BRK,TR,'),
('35','3W,4W,5W,','','70',',BK,DB,DBZ,JV,KL,JS,LP,LPV,JD,JL,JLV,JLH,HB,BRK,TR,'),
('39','0T,0G,','','5',',DB,DBZ,JD,BR,OS,'),
('39','2T,3T,5T,','','10',',DB,DBZ,JD,BR,OS,'),
('39','3R,5R,','','5',',BR,'),
('41','3N,4N,3K9,4K9,','','30',',BK,JD,LP,LPV,DB,DBZ,DG,'),
('41','3N,4N,3K9,4K9,','BO','30',',BK,DB,DBZ,LP,LPV,JD,'),
('41','3N,4N,3K9,4K9,','BK','30',',BK,DB,DBZ,JD,LP,LPV,'),
('41','3F,4F,3A,4A,3S9,4S9,3B6,3B9,4B9,3D6,3D9,4D9,','','30',',BK,JD,JV,KL,JS,JL,JLV,JLH,LP,LPV,HB,DG,'),
('41','3F,4F,3A,4A,3S9,4S9,3B6,3B9,4B9,3D6,3D9,4D9,','BK','30',',BK,JD,JV,KL,JS,JL,JLV,JLH,LP,LPV,HB,'),
('43','3K,4K,3I,4I,5M1,5M2,5M3,5M5,5K5,5K6,5I4,','','25',',BK,DB,DBZ,LP,LPV,HB,JD,DG,'),
('43','3K,4K,3I,4I,5M1,5M2,5M3,5M5,5K5,5K6,5I4,','BO','25',',BK,DB,DBZ,LP,LPV,HB,JD,'),
('43','3K,4K,3I,4I,5M1,5M2,5M3,5M5,5K5,5K6,5I4,','BK','25',',BK,DB,DBZ,LP,LPV,HB,JD,'),
('45','3S,4S,3B,4B,3D,4D,3H,4H,','','25',',BK,JD,LP,LPV,JV,KL,JS,JL,JLV,JLH,DB,DBZ,JDO,HB,TR,'),
('45','3S,4S,3B,4B,3D,4D,3H,4H,','BK','25',',BK,DB,DBZ,JD,LP,LPV,JV,KL,JS,JL,JLV,JLH,HB,TR,JDO,'),
('45','3S,4S,3B,4B,3D,4D,3H,4H,','DB','25',',BK,LP,LPV,JD,JV,KL,JS,JL,JLV,JLH,HB,TR,JDO,DB,DBZ,'),
('47','3V,4V,3O,','','25',',BK,JD,DB,DBZ,LP,LPV,JV,KL,JS,JL,JLV,JLH,JDO,HB,'),
('47','3V,4V,3O,','DB','25',',BK,LP,LPV,HB,JV,KL,JS,JL,JLV,JLH,JD,DB,DBZ,');
INSERT INTO `phs_meldrvyhl` (`oHS`,`LT`,`hDR`,`p`,`DR`) VALUES
('47','3V,4V,3O,','BK','25',',BK,DB,DBZ,JD,LP,LPV,JV,KL,JS,JL,JLV,JLH,HB,'),
('47','4O,4P,','','25',',BK,JD,DB,DBZ,LP,LPV,OS,JDO,'),
('47','4O,4P,','BO','25',',BK,DB,DBZ,JD,LP,LPV,BR,OS,'),
('47','4O,4P,','DB','25',',BK,JD,LP,LPV,'),
('51','5N,6N,5M9,5K9,6K9,','','30',',BK,JD,JV,KL,LP,LPV,DG,'),
('51','5N,6N,5M9,5K9,6K9,','BK','30',',BK,JD,JV,KL,LP,LPV,DG,'),
('51','5S9,6S9,5B9,6B9,6B6,5D9,5F,6F,5A,6A,','','30',',BK,JD,JV,KL,JS,JL,JLV,JLH,LP,LPV,DG,'),
('51','5S9,6S9,5B9,6B9,6B6,5D9,5F,6F,5A,6A,','BK','30',',BK,JD,JV,KL,JS,JL,JLV,JLH,LP,LPV,'),
('51','5U,','','30',',BK,JL,JLV,JLH,LP,LPV,JD,JV,KL,JS,'),
('53','5K,6K,5I,6I,6M,','','25',',BK,JD,LP,LPV,DG,'),
('55','5S,6S,5B,6B,5D,6D,5H,6H,','','25',',BK,JD,JV,KL,JL,JLV,JLH,LP,LPV,JS,JDO,TR,'),
('55','5S,6S,5B,6B,5D,6D,5H,6H,','BK','25',',BK,JD,JV,KL,JL,JLV,JLH,LP,LPV,JS,JDO,'),
('57','5V,6V,','','25',',BK,JD,JV,KL,JL,JLV,JLH,LP,LPV,JS,JDO,'),
('57','5O,6O,5P,6P,6Q,','','25',',BK,JD,JDO,BR,OS,'),
('59','2G,3G,4G,3V9,3V8,4V9,4V8,','','20',',BK,JD,DB,DBZ,JV,KL,LP,LPV,OL,OS,'),
('59','2G,3G,4G,3V9,3V8,4V9,4V8,','DB','20',',BK,JD,JV,KL,LP,LPV,DB,DBZ,'),
('59','5G,6G,','','15',',BK,JD,JV,KL,OL,OS,'),
('59','5V9,6V9,5V7,6V7,6V8,','','20',',BK,JD,JV,KL,OL,OS,'),
('59','0G9,0G8,','','5',',JD,DB,DBZ,BR,OL,OS,'),
('59','4R,','','5',',BR,JD,');
INSERT INTO `phs_meldrvyhl` (`oHS`,`LT`,`hDR`,`p`,`DR`) VALUES
('71','7M9,7K9,7S9,7N,7F,7A,','','15',',BK,JD,JV,KL,JR,'),
('73','7M,7K,','','15',',BK,JD,JR,'),
('75','7S,7B,','','15',',BK,JD,JR,JV,KL,'),
('77','7V,7O,7P,7Q,','','10',',BK,JD,JR,JV,KL,BR,'),
('77','8V,8O,8P,','','5',',JD,JR,'),
('79','6T,7T,7G,7V9,8V9,','','5',',JD,JR,'),
('79','8Q,8T,8G,7R,6R,','','5',',BR,JD,JR,'),
('1','0X,','','10',',BK,DB,DBZ,HB,LP,LPV,DBP,BRK,MK,BB,'),
('1','0Z,','','5',',BK,BR,DB,DBZ,JD,'),
('1','0Y,','','5',',BK,BR,DB,DBZ,JD,'),
('1','1X,','','90',',DB,DBZ,DBP,HB,LP,LPV,BB,BRK,MK,BR,JV,KL,JS,JL,JLV,JLH,'),
('1','2X,','','90',',BK,DB,DBZ,HB,LP,LPV,JV,KL,JS,JL,JLV,JLH,BRK,MK,BB,TS,'),
('1','3X,4X,','','80',',BK,DB,DBZ,LP,LPV,HB,JV,KL,JS,JL,JLV,JLH,JD,BRK,MK,BB,TS,'),
('1','1Z,','','70',',DB,DBZ,HB,LP,LPV,BR,BRK,MK,'),
('1','2Z,2Y,','','60',',BK,DB,DBZ,LP,LPV,BR,HP,'),
('1','3Z,4Z,3Y,4Y,','','30',',BK,DB,DBZ,JD,BR,'),
('1','5Z,6Z,5Y,6Y,','','30',',BK,JD,BR,JR,JV,KL,'),
('1','7Y,7Z,','','10',',BK,JD,BR,JR,'),
('1','8Y,','','5',',BR,JR,'),
('1','1J,','','95',',DB,DBZ,JV,KL,HB,LP,LPV,JL,JLV,JLH,BRK,MK,BB,TS,TR,JS,');
INSERT INTO `phs_meldrvyhl` (`oHS`,`LT`,`hDR`,`p`,`DR`) VALUES
('1','3J,','','90',',BK,JV,KL,LP,LPV,DB,DBZ,HB,JS,JL,JLV,JLH,BRK,MK,TS,JD,'),
('1','5J,','','60',',BK,JV,KL,JD,JL,JLV,JLH,LP,LPV,JS,'),
('1','6L,','','70',',BK,OLS,JV,KL,JS,OL,JD,'),
('1','0R,','','5',',BRP,BL,'),
('1','0R5,0R6','','1',',BRP,KOS,'),
('1','8R,','','1',',BRP,KOS,JR,'),
('1','9R,','','0',',BRP,JR,'),
('2','8Z,8N,8F,8A,8M,8K,8S,','','0',',BK,JR,BR,JV,KL,'),
('3','9K,9Z,9Y,','','0',',JR,');


CREATE TABLE IF NOT EXISTS `phs_olh` (
`Kod`  FLOAT NOT NULL, 
`POPIS`  VARCHAR(20) NOT NULL, 
`OLH_LIC`  VARCHAR(30) NOT NULL, 
`OLH`  VARCHAR(80) NOT NULL, 
`OLH_ID`  VARCHAR(10) NOT NULL, 
`OLH_PRAV_TIT`  INT NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `phs_olh` (`Kod`,`POPIS`,`OLH_LIC`,`OLH`,`OLH_ID`,`OLH_PRAV_TIT`) VALUES
('1','1','1','1','1','1');


CREATE TABLE IF NOT EXISTS `phs_orgur1` (
`KOD`  INT NOT NULL, 
`POPIS`  VARCHAR(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `phs_orgur1` (`KOD`,`POPIS`) VALUES
('1','Český Šternberk');


CREATE TABLE IF NOT EXISTS `phs_orgur2` (
`KOD`  INT NOT NULL, 
`POPIS`  VARCHAR(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `phs_orgur2` (`KOD`,`POPIS`) VALUES
('1','Poboř'),
('2','Zalíbená');


CREATE TABLE IF NOT EXISTS `phs_orgur3` (
`KOD`  INT NOT NULL, 
`POPIS`  VARCHAR(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `phs_orgur3` (`KOD`,`POPIS`) VALUES
('1','Poboř'),
('2','Zalíbená');


CREATE TABLE IF NOT EXISTS `phs_plt_lt` (
`PLT`  VARCHAR(10) NOT NULL, 
`LT`  VARCHAR(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




CREATE TABLE IF NOT EXISTS `phs_porktg` (
`ODDELENI`  INT NOT NULL, 
`DILEC`  VARCHAR(1) NOT NULL, 
`POROST`  VARCHAR(1) NOT NULL, 
`ID`  INT NOT NULL, 
`KTG`  VARCHAR(4) NOT NULL, 
`TEXT`  VARCHAR(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `phs_porktg` (`ODDELENI`,`DILEC`,`POROST`,`ID`,`KTG`,`TEXT`) VALUES
('3','J','','0','21a',''),
('6','E','','0','21a',''),
('6','F','','3','32e',''),
('8','B','','3','32e',''),
('11','H','','3','32e',''),
('12','A','','3','32e',''),
('12','B','','2','32c',''),
('12','C','','2','32c',''),
('12','D','','2','32c',''),
('13','D','','0','21a',''),
('20','C','','0','21a',''),
('20','F','','2','32c',''),
('23','B','','0','21a',''),
('23','C','','3','32e',''),
('26','E','','0','21a',''),
('28','B','','3','32e',''),
('28','D','','2','32c',''),
('28','F','','3','32e',''),
('28','G','','0','21a','');
INSERT INTO `phs_porktg` (`ODDELENI`,`DILEC`,`POROST`,`ID`,`KTG`,`TEXT`) VALUES
('29','A','','1','32a',''),
('29','F','','3','32e',''),
('35','F','','0','21a',''),
('36','B','','0','21a',''),
('36','G','','3','32e','');




CREATE TABLE IF NOT EXISTS `phs_porpp` (
`ODDELENI`  INT NOT NULL, 
`DILEC`  VARCHAR(1) NOT NULL, 
`POROST`  VARCHAR(1) NOT NULL, 
`PSKBZLJP`  VARCHAR(12) NOT NULL, 
`ID`  INT NOT NULL, 
`PP_KOD`  FLOAT NOT NULL, 
`NAZEV`  VARCHAR(30) NOT NULL, 
`TEXT`  VARCHAR(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `phs_porpp` (`ODDELENI`,`DILEC`,`POROST`,`PSKBZLJP`,`ID`,`PP_KOD`,`NAZEV`,`TEXT`) VALUES
('29','A','a','1','1','569','Na St°YbrnU',''),
('29','A','a','11','1','569','Na St°YbrnU',''),
('29','A','a','13','1','569','Na St°YbrnU',''),
('29','A','a','14/6a','1','569','Na St°YbrnU',''),
('29','A','a','17/6b','1','569','Na St°YbrnU',''),
('29','A','a','3a','1','569','Na St°YbrnU',''),
('29','A','a','3b','1','569','Na St°YbrnU',''),
('29','A','a','3c','1','569','Na St°YbrnU',''),
('29','A','a','4','1','569','Na St°YbrnU',''),
('29','A','a','551','1','569','Na St°YbrnU',''),
('29','A','a','7','1','569','Na St°YbrnU',''),
('29','E','a','7','1','569','Na St°YbrnU','');




CREATE TABLE IF NOT EXISTS `phs_porzvl` (
`ODDELENI`  INT NOT NULL, 
`DILEC`  VARCHAR(1) NOT NULL, 
`POROST`  VARCHAR(1) NOT NULL, 
`ID`  INT NOT NULL, 
`ZVL_KOD`  FLOAT NOT NULL, 
`TEXT`  VARCHAR(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `phs_porzvl` (`ODDELENI`,`DILEC`,`POROST`,`ID`,`ZVL_KOD`,`TEXT`) VALUES
('1','A','a','3','22',''),
('1','B','a','3','22',''),
('1','C','a','3','22',''),
('1','D','a','3','22',''),
('3','A','a','3','22',''),
('3','D','a','3','22',''),
('3','H','a','3','22',''),
('4','G','a','3','22',''),
('4','H','a','3','22',''),
('5','A','a','2','21',''),
('5','B','a','2','21',''),
('6','E','a','2','21',''),
('6','F','a','2','21',''),
('7','A','a','3','22',''),
('8','B','a','2','21',''),
('8','B','a','3','22',''),
('8','C','a','3','22',''),
('9','C','a','3','22',''),
('10','C','a','3','22','');
INSERT INTO `phs_porzvl` (`ODDELENI`,`DILEC`,`POROST`,`ID`,`ZVL_KOD`,`TEXT`) VALUES
('10','D','a','3','22',''),
('10','E','a','3','22',''),
('10','F','a','3','22',''),
('10','G','a','3','22',''),
('11','F','a','3','22',''),
('12','A','a','3','22',''),
('12','B','a','3','22',''),
('12','C','a','3','22',''),
('12','D','a','3','22',''),
('14','B','a','2','21',''),
('15','B','a','2','21',''),
('16','C','a','3','22',''),
('17','A','a','2','21',''),
('17','C','a','2','21',''),
('18','A','a','2','21',''),
('18','D','a','3','22',''),
('18','F','a','3','22',''),
('18','G','a','3','22',''),
('20','C','a','3','22',''),
('21','A','a','2','21','');
INSERT INTO `phs_porzvl` (`ODDELENI`,`DILEC`,`POROST`,`ID`,`ZVL_KOD`,`TEXT`) VALUES
('21','B','a','2','21',''),
('21','B','a','3','22',''),
('22','A','a','2','21',''),
('22','A','a','3','22',''),
('23','B','a','2','21',''),
('23','C','a','2','21',''),
('23','C','a','3','22',''),
('26','A','a','4','51',''),
('26','D','a','1','20',''),
('26','E','a','1','20',''),
('27','A','a','3','22',''),
('27','B','a','1','20',''),
('27','B','a','3','22',''),
('28','A','a','1','20',''),
('28','B','a','1','20',''),
('28','B','a','3','22',''),
('28','C','a','1','20',''),
('28','D','a','3','22',''),
('28','E','a','1','20',''),
('28','F','a','1','20','');
INSERT INTO `phs_porzvl` (`ODDELENI`,`DILEC`,`POROST`,`ID`,`ZVL_KOD`,`TEXT`) VALUES
('28','F','a','3','22',''),
('28','G','a','1','20',''),
('28','G','a','2','21',''),
('28','G','a','3','22',''),
('28','H','a','1','20',''),
('28','H','a','2','21',''),
('28','J','a','2','21',''),
('29','A','a','1','20',''),
('29','A','a','2','21',''),
('29','B','a','2','21',''),
('29','C','a','1','20',''),
('29','C','a','2','21',''),
('29','D','a','2','21',''),
('29','E','a','2','21',''),
('29','F','a','1','20',''),
('30','A','a','3','22',''),
('30','B','a','3','22',''),
('30','C','a','2','21',''),
('30','D','a','2','21',''),
('31','A','a','2','21','');
INSERT INTO `phs_porzvl` (`ODDELENI`,`DILEC`,`POROST`,`ID`,`ZVL_KOD`,`TEXT`) VALUES
('31','B','a','2','21',''),
('32','A','a','2','21',''),
('33','C','a','3','22',''),
('35','A','a','1','20',''),
('35','B','a','1','20',''),
('35','G','a','1','20',''),
('36','A','a','1','20',''),
('36','A','a','3','22',''),
('36','B','a','3','22',''),
('36','D','a','3','22',''),
('36','E','a','1','20',''),
('36','F','a','1','20',''),
('36','G','a','1','20',''),
('36','G','a','3','22','');


CREATE TABLE IF NOT EXISTS `phs_probir` (
`DREVINA`  VARCHAR(250) NOT NULL, 
`PODMINKA`  VARCHAR(250) NOT NULL, 
`procTV1`  INT NOT NULL, 
`procTV2`  INT NOT NULL, 
`procTV3`  INT NOT NULL, 
`procTV4`  INT NOT NULL, 
`procTV5`  INT NOT NULL, 
`procTV6`  INT NOT NULL, 
`procTV7`  INT NOT NULL, 
`procTV8`  INT NOT NULL, 
`procTV9`  INT NOT NULL, 
`procTV10`  INT NOT NULL, 
`procTV11`  INT NOT NULL, 
`procTV12`  INT NOT NULL, 
`procTV13`  INT NOT NULL, 
`procTV14`  INT NOT NULL, 
`procTV15`  INT NOT NULL, 
`procTV16`  INT NOT NULL, 
`procTV17`  INT NOT NULL, 
`procTV18`  INT NOT NULL, 
`procTV19`  INT NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `phs_probir` (`DREVINA`,`PODMINKA`,`procTV1`,`procTV2`,`procTV3`,`procTV4`,`procTV5`,`procTV6`,`procTV7`,`procTV8`,`procTV9`,`procTV10`,`procTV11`,`procTV12`,`procTV13`,`procTV14`,`procTV15`,`procTV16`,`procTV17`,`procTV18`,`procTV19`) VALUES
('SM,SMP,SMC,SMS,SMO,SME,SMX','(ZAKM>9)and((STAN_RADA='J')or(STAN_RADA='X')or(STAN_RADA='Y')or(STAN_RADA='Z')or(STAN_RADA='K')or(STAN_RADA='M')or(STAN_RADA='I')or(STAN_RADA='C')or(STAN_RADA='W')or(STAN_RADA='N')or(STAN_RADA='A')or(STAN_RADA='F'))','30','30','30','30','30','26','23','21','20','19','19','18','17','16','16','15','15','14','14'),
('SM,SMP,SMC,SMS,SMO,SME,SMX','(ZAKM=9)and((STAN_RADA='J')or(STAN_RADA='X')or(STAN_RADA='Y')or(STAN_RADA='Z')or(STAN_RADA='K')or(STAN_RADA='M')or(STAN_RADA='I')or(STAN_RADA='C')or(STAN_RADA='W')or(STAN_RADA='N')or(STAN_RADA='A')or(STAN_RADA='F'))','23','23','23','23','23','19','16','14','13','11','10','9','9','8','8','7','6','5','5'),
('SM,SMP,SMC,SMS,SMO,SME,SMX','(ZAKM=8)and((STAN_RADA='J')or(STAN_RADA='X')or(STAN_RADA='Y')or(STAN_RADA='Z')or(STAN_RADA='K')or(STAN_RADA='M')or(STAN_RADA='I')or(STAN_RADA='C')or(STAN_RADA='W')or(STAN_RADA='N')or(STAN_RADA='A')or(STAN_RADA='F'))','18','18','18','18','18','14','10','8','6','4','3','1','1','0','0','0','0','0','0'),
('SM,SMP,SMC,SMS,SMO,SME,SMX','(ZAKM=7)and((STAN_RADA='J')or(STAN_RADA='X')or(STAN_RADA='Y')or(STAN_RADA='Z')or(STAN_RADA='K')or(STAN_RADA='M')or(STAN_RADA='I')or(STAN_RADA='C')or(STAN_RADA='W')or(STAN_RADA='N')or(STAN_RADA='A')or(STAN_RADA='F'))','10','10','10','10','10','7','4','2','0','0','0','0','0','0','0','0','0','0','0'),
('SM,SMP,SMC,SMS,SMO,SME,SMX','(ZAKM>9)and(not((STAN_RADA='J')or(STAN_RADA='X')or(STAN_RADA='Y')or(STAN_RADA='Z')or(STAN_RADA='K')or(STAN_RADA='M')or(STAN_RADA='I')or(STAN_RADA='C')or(STAN_RADA='W')or(STAN_RADA='N')or(STAN_RADA='A')or(STAN_RADA='F')))','26','26','26','26','26','23','20','18','17','15','14','13','13','12','12','11','11','10','10'),
('SM,SMP,SMC,SMS,SMO,SME,SMX','(ZAKM=9)and(not((STAN_RADA='J')or(STAN_RADA='X')or(STAN_RADA='Y')or(STAN_RADA='Z')or(STAN_RADA='K')or(STAN_RADA='M')or(STAN_RADA='I')or(STAN_RADA='C')or(STAN_RADA='W')or(STAN_RADA='N')or(STAN_RADA='A')or(STAN_RADA='F')))','20','20','20','20','20','16','13','11','10','8','7','6','5','4','3','2','2','1','0'),
('SM,SMP,SMC,SMS,SMO,SME,SMX','(ZAKM=8)and(not((STAN_RADA='J')or(STAN_RADA='X')or(STAN_RADA='Y')or(STAN_RADA='Z')or(STAN_RADA='K')or(STAN_RADA='M')or(STAN_RADA='I')or(STAN_RADA='C')or(STAN_RADA='W')or(STAN_RADA='N')or(STAN_RADA='A')or(STAN_RADA='F')))','13','13','13','13','13','10','7','5','3','1','0','0','0','0','0','0','0','0','0'),
('JD,JDO,JDJ,JDK,JDV,JDX,DG','(ZAKM>9)','38','38','38','38','38','34','31','27','24','21','18','16','15','13','12','11','10','9','8'),
('JD,JDO,JDJ,JDK,JDV,JDX,DG','(ZAKM=9)','32','32','32','32','32','28','24','20','17','14','12','10','9','7','6','5','4','3','2'),
('JD,JDO,JDJ,JDK,JDV,JDX,DG','(ZAKM=8)','26','26','26','26','26','22','18','14','11','8','6','4','3','1','0','0','0','0','0'),
('JD,JDO,JDJ,JDK,JDV,JDX,DG','(ZAKM=7)','19','19','19','19','19','15','12','9','6','3','1','0','0','0','0','0','0','0','0'),
('BO,BOC,BKS,VJ,LMB,BOP,BOX,KOS,BL,MD,MDX','(ZAKM>9)','22','22','22','22','22','19','16','14','13','11','10','9','8','7','7','6','5','5','5'),
('BO,BOC,BKS,VJ,LMB,BOP,BOX,KOS,BL,MD,MDX','(ZAKM=9)','15','15','15','15','15','13','11','9','8','7','6','5','4','3','3','2','2','1','1'),
('BO,BOC,BKS,VJ,LMB,BOP,BOX,KOS,BL,MD,MDX','(ZAKM=8)','8','8','8','8','8','6','5','4','3','2','1','0','0','0','0','0','0','0','0'),
('DB,DBS,DBZ,DBC,DBP,DBB,DBX,CER,JL,JLH,JLV,OR,ORC,PL','(ZAKM>9)','14','14','14','14','14','13','12','11','11','10','10','9','8','7','7','7','7','6','6'),
('DB,DBS,DBZ,DBC,DBP,DBB,DBX,CER,JL,JLH,JLV,OR,ORC,PL','(ZAKM=9)','11','11','11','11','11','10','9','8','7','6','6','5','4','3','3','2','2','2','2'),
('DB,DBS,DBZ,DBC,DBP,DBB,DBX,CER,JL,JLH,JLV,OR,ORC,PL','(ZAKM=8)','8','8','8','8','8','6','5','4','3','2','1','0','0','0','0','0','0','0','0'),
('DB,DBS,DBZ,DBC,DBP,DBB,DBX,CER,JL,JLH,JLV,OR,ORC,PL','(ZAKM=7)','4','4','4','4','4','3','2','1','0','0','0','0','0','0','0','0','0','0','0'),
('BK,HB,JV,KL,BB,JVJ,JVX,JS,JSA,JSU,AK,BR,BRP,JR,BRK,MK,TR,STR,HR,JB,LTX,LP,LPV,LPS,OL,OLS,OLZ,OS,TP,TPC,TPX,TPS,JIV,VR,KS,KJ,PJ,LMX','(ZAKM>9)','32','32','32','32','32','29','27','25','23','21','19','18','17','15','14','13','12','11','11');
INSERT INTO `phs_probir` (`DREVINA`,`PODMINKA`,`procTV1`,`procTV2`,`procTV3`,`procTV4`,`procTV5`,`procTV6`,`procTV7`,`procTV8`,`procTV9`,`procTV10`,`procTV11`,`procTV12`,`procTV13`,`procTV14`,`procTV15`,`procTV16`,`procTV17`,`procTV18`,`procTV19`) VALUES
('BK,HB,JV,KL,BB,JVJ,JVX,JS,JSA,JSU,AK,BR,BRP,JR,BRK,MK,TR,STR,HR,JB,LTX,LP,LPV,LPS,OL,OLS,OLZ,OS,TP,TPC,TPX,TPS,JIV,VR,KS,KJ,PJ,LMX','(ZAKM=9)','23','23','23','23','23','21','19','18','17','15','14','12','11','10','9','8','7','6','5'),
('BK,HB,JV,KL,BB,JVJ,JVX,JS,JSA,JSU,AK,BR,BRP,JR,BRK,MK,TR,STR,HR,JB,LTX,LP,LPV,LPS,OL,OLS,OLZ,OS,TP,TPC,TPX,TPS,JIV,VR,KS,KJ,PJ,LMX','(ZAKM=8)','15','15','15','15','15','14','13','12','11','10','9','8','7','5','4','3','2','1','0'),
('BK,HB,JV,KL,BB,JVJ,JVX,JS,JSA,JSU,AK,BR,BRP,JR,BRK,MK,TR,STR,HR,JB,LTX,LP,LPV,LPS,OL,OLS,OLZ,OS,TP,TPC,TPX,TPS,JIV,VR,KS,KJ,PJ,LMX','(ZAKM=7)','9','9','9','9','9','7','6','5','5','4','4','3','3','1','1','0','0','0','0');


CREATE TABLE IF NOT EXISTS `phs_tab_hs` (
`CISLO_HS`  SMALLINT NOT NULL, 
`NAZEV_HS`  VARCHAR(30) NOT NULL, 
`OBMYTI`  FLOAT NOT NULL, 
`OBN_DOBA`  FLOAT NOT NULL, 
`POC_OBNOVY`  FLOAT NOT NULL, 
`POC_PROR`  FLOAT NOT NULL, 
`POC_MYTKLID`  FLOAT NOT NULL, 
`POD_MEL_DR`  FLOAT NOT NULL, 
`ODVOZ_TEZ`  VARCHAR(1) NOT NULL, 
`SEST_DTO`  VARCHAR(2) NOT NULL, 
`PovTezPod80`  VARCHAR(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


INSERT INTO `phs_tab_hs` (`CISLO_HS`,`NAZEV_HS`,`OBMYTI`,`OBN_DOBA`,`POC_OBNOVY`,`POC_PROR`,`POC_MYTKLID`,`POD_MEL_DR`,`ODVOZ_TEZ`,`SEST_DTO`,`PovTezPod80`) VALUES
('11','21a-SM','150','50','121','11','100','0','I','A','A'),
('13','21a-BO','200','50','171','11','150','0','I','A','A'),
('16','21a-DB,BK','200','50','171','11','150','0','I','A','A'),
('17','21a-ost.listn.','100','50','71','5','100','0','I','A','A'),
('211','Exponovaná stanoviště nižších','100','30','81','5','70','0','D','A','A'),
('213','Exponovaná stanoviště nižších','120','30','101','11','90','0','D','A','A'),
('215','Exponovaná stanoviště nižších','130','30','111','11','100','0','D','A','A'),
('251','Živná stanoviště nižších poloh','100','20','91','5','80','0','D','A','A'),
('253','Živná stanoviště nižších poloh','110','20','101','11','90','0','D','A','A'),
('256','Živná stanoviště nižších poloh','150','40','131','11','110','0','D','A','A'),
('271','Oglejená chudá stanoviště nižš','100','20','91','5','80','0','D','A','A'),
('273','Oglejená chudá stanoviště nižš','120','20','111','11','100','0','D','A','A'),
('291','Olšová stanoviště na podmáčený','100','20','91','5','80','0','D','A','A'),
('297','Olšová stanoviště na podmáčený','80','20','71','5','60','0','D','A','A'),
('411','Exponovaná stanoviště středníc','110','30','91','11','80','0','D','A','A'),
('413','Exponovaná stanoviště středníc','120','30','101','11','90','0','D','A','A'),
('416','Exponovaná stanoviště středníc','130','40','111','11','90','0','D','A','A'),
('431','Kyselá stanoviště středních po','110','30','91','11','80','0','D','A','A'),
('433','Kyselá stanoviště středních po','110','20','101','11','90','0','D','A','A');
INSERT INTO `phs_tab_hs` (`CISLO_HS`,`NAZEV_HS`,`OBMYTI`,`OBN_DOBA`,`POC_OBNOVY`,`POC_PROR`,`POC_MYTKLID`,`POD_MEL_DR`,`ODVOZ_TEZ`,`SEST_DTO`,`PovTezPod80`) VALUES
('435','Kyselá stanoviště středních po','130','30','111','11','100','0','D','A','A'),
('436','Kyselá stanoviště středních po','130','40','111','11','90','0','D','A','A'),
('451','Živná stanoviště středních pol','100','30','81','5','70','0','D','A','A'),
('453','Živná stanoviště středních pol','100','20','91','5','80','0','D','A','A'),
('455','Živná stanoviště středních pol','130','30','111','11','100','0','D','A','A'),
('456','Živná stanoviště středních pol','130','40','111','11','90','0','D','A','A'),
('457','Živná stanoviště středních pol','70','20','61','5','50','0','D','A','A'),
('471','Oglejená stanoviště středních','110','30','91','11','80','0','D','A','A'),
('473','Oglejená stanoviště středních','110','30','91','11','80','0','D','A','A'),
('475','Oglejená stanoviště středních','140','30','121','11','110','0','D','A','A'),
('477','Oglejená stanoviště středních','70','20','61','5','50','0','D','A','A'),
('4401','32a','150','50','121','11','100','0','I','A','A'),
('6187','32c-ost.listn.','130','20','121','11','110','0','D','A','A'),
('6401','32c-SM,BO','130','30','111','11','100','0','D','A','A'),
('6405','32c-DB,BK','140','30','121','11','110','0','D','A','A'),
('6441','32c-SM,BO','120','30','101','11','90','0','D','A','A'),
('6445','32c-DB,BK','150','30','131','11','120','0','D','A','A'),
('7201','32e-SM','120','30','101','11','90','0','D','A','A'),
('7203','32e-BO','140','30','121','11','110','0','D','A','A'),
('7205','32e-DB,BK','150','30','131','11','120','0','D','A','A');
INSERT INTO `phs_tab_hs` (`CISLO_HS`,`NAZEV_HS`,`OBMYTI`,`OBN_DOBA`,`POC_OBNOVY`,`POC_PROR`,`POC_MYTKLID`,`POD_MEL_DR`,`ODVOZ_TEZ`,`SEST_DTO`,`PovTezPod80`) VALUES
('7207','32e-ost.listn.','120','30','101','11','90','0','D','A','A'),
('7225','32e-DB','150','30','131','11','120','0','D','A','A'),
('7241','32e-SM','120','20','111','11','100','0','D','A','A'),
('7243','32e-BO','130','20','121','11','110','0','D','A','A'),
('7401','32e-SM','130','30','111','11','100','0','D','A','A'),
('7403','32e-BO','140','30','121','11','110','0','D','A','A'),
('7406','32e-BK','150','40','131','11','110','0','D','A','A');


CREATE TABLE IF NOT EXISTS `phs_zvlstpor` (
`ODD`  FLOAT NOT NULL, 
`DIL`  VARCHAR(1) NOT NULL, 
`POR`  VARCHAR(1) NOT NULL, 
`ID`  FLOAT NOT NULL, 
`Org_Uroven2`  FLOAT NOT NULL, 
`Zvl_Statut`  VARCHAR(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




