{ DATABASE COPRECICZ,S_250707 delimiter | }

{ MAP: Export byl proveden ve verzi CS16.7951G aplikace KS mzdy PROFi }
{ MAP: v databázi jsou všechna osobní čísla }
{ MAP: Včetně osobních údajů }
{ MAP: V exportu nejsou obsaženy data z položek typu BLOB. }
{ MAP: Případné chyby byly při vytváření exportu ignorovány. }
{ MAP: V exportu jsou obsahy archivních tabulek jen za poslední 3 měsíce. }
{ MAP: V exportu jsou obsahy některých velkých tabulek jen za poslední celý rok. }
{ MAP: výchozí platformou, ze které byl export vytvořen je ORACLE }
{ MAP: Datový typ datumových sloupců: char(10 BYTE) }
{ MAP: po provedení dbimportu je nutné: }
{ MAP: 1.) nastavit v I-Connectu položku DBDATE na Y4MD- }
{ MAP: 2.) provést vynucenou(!) úpravu databáze }

grant dba to "mzdy";
grant connect to "public";

{ TABLE "mzdy".poriz_kody row size = 0 number of columns = 12 index size = 0 }
{ unload file name = poriz_kody.unl number of rows = 8 }
create table "mzdy".poriz_kody 
  (
    kod integer not null,
    dny char(1),
    hodiny char(1),
    sazba char(1),
    castka char(1),
    budget char(1),
    sazba_print char(1) not null,
    gen_dny char(1),
    vyraz char(999),
    id_podniku integer not null,
    informovat char(1),
    povinna_pozn char(1)
  );
revoke all on "mzdy".poriz_kody from "public";

create unique  index "mzdy".ix_por_kody on "mzdy".poriz_kody (kod, id_podniku);
{ TABLE "mzdy".post_sazby row size = 0 number of columns = 7 index size = 0 }
{ unload file name = post_sazby.unl number of rows = 0 }
create table "mzdy".post_sazby 
  (
    id char(2) not null,
    naz_sazby char(50),
    zkd integer,
    cast_od decimal(16,2),
    cast_do decimal(16,2),
    cena decimal(16,2),
    sluzba integer
  );
revoke all on "mzdy".post_sazby from "public";

{ TABLE "mzdy".pomucky_narok row size = 0 number of columns = 9 index size = 0 }
{ unload file name = pomucky_narok.unl number of rows = 0 }
create table "mzdy".pomucky_narok 
  (
    id_narok integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    id_pomucky char(12) not null,
    mnozstvi integer not null,
    narok_podle char(1) not null,
    perioda integer,
    id_velikosti integer,
    datum_potvrzeni date
  );
revoke all on "mzdy".pomucky_narok from "public";

{ TABLE "mzdy".pomucky_prevod row size = 0 number of columns = 4 index size = 0 }
{ unload file name = pomucky_prevod.unl number of rows = 0 }
create table "mzdy".pomucky_prevod 
  (
    id_prevodu integer not null,
    id_sklady_prevod integer not null,
    id_na_sklade integer not null,
    mnozstvi integer not null
  );
revoke all on "mzdy".pomucky_prevod from "public";

{ TABLE "mzdy".pomucky_prijem row size = 0 number of columns = 6 index size = 0 }
{ unload file name = pomucky_prijem.unl number of rows = 0 }
create table "mzdy".pomucky_prijem 
  (
    id_prijmu integer not null,
    id_na_sklade integer not null,
    prij_mn integer not null,
    uzivatel char(64) not null,
    datum date not null,
    poznamka char(100)
  );
revoke all on "mzdy".pomucky_prijem from "public";

{ TABLE "mzdy".pomucky_vydej row size = 0 number of columns = 15 index size = 0 }
{ unload file name = pomucky_vydej.unl number of rows = 0 }
create table "mzdy".pomucky_vydej 
  (
    id_vydeje integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    id_na_sklade integer not null,
    mnozstvi integer not null,
    vydal char(64) not null,
    id_narok integer,
    vydano char(1) not null,
    dat_vydeje date not null,
    dat_vrac date,
    id_duvodu char(7),
    stornovano char(1),
    poznamka char(100),
    prevedeno integer,
    vraceno_na integer
  );
revoke all on "mzdy".pomucky_vydej from "public";

{ TABLE "mzdy".pomu_zam row size = 0 number of columns = 38 index size = 0 }
{ unload file name = pomu_zam.unl number of rows = 0 }
create table "mzdy".pomu_zam 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    sklad char(10) not null,
    cis_pomucky char(12) not null,
    cis_pol integer not null,
    id_vyd integer not null,
    pocet decimal(10,3),
    perioda integer,
    dat_vyd date not null,
    dat_vrac date,
    duv_vrac char(7),
    prev_na_os_cislo decimal(10,0),
    prev_na_cislo_pom integer,
    dat_stor date,
    uzivatel char(64) not null,
    id_cis1 integer,
    id_pol1 integer,
    vel1 char(8),
    id_cis2 integer,
    id_pol2 integer,
    vel2 char(8),
    cena decimal(16,2),
    znacka char(30),
    model char(80),
    inv_cislo char(20),
    vyr_cislo char(30),
    poznamka char(50),
    dat_exp date,
    vyd_karta char(1),
    vrac_karta char(1),
    vyd_bez_nar char(1),
    sklad_vrac char(10),
    cis_pol_vrac integer,
    pomu_pozn char(50),
    serv_prizn char(1),
    uzivatel_vrac char(64),
    uzivatel_stor char(64),
    vrac_vyrazena char(1)
  );
revoke all on "mzdy".pomu_zam from "public";

create  index "mzdy".idx_pomu on "mzdy".pomu_zam (sklad, cis_pomucky, cis_pol);
{ TABLE "mzdy".pomucky row size = 0 number of columns = 9 index size = 0 }
{ unload file name = pomucky.unl number of rows = 0 }
create table "mzdy".pomucky 
  (
    id_pomucky char(12) not null,
    nazev char(70) not null,
    jednotka char(7) not null,
    perioda integer not null,
    vracet char(1) not null,
    min_vyd_mn integer not null,
    cis_rizik char(7),
    id_cis_typ integer,
    amortizace char(1)
  );
revoke all on "mzdy".pomucky from "public";

{ TABLE "mzdy".pomucky_atribut row size = 0 number of columns = 3 index size = 0 }
{ unload file name = pomucky_atribut.unl number of rows = 0 }
create table "mzdy".pomucky_atribut 
  (
    id_atributu integer not null,
    nazev char(70) not null,
    id_pomucky char(12) not null
  );
revoke all on "mzdy".pomucky_atribut from "public";

{ TABLE "mzdy".pomucky_cis_vel row size = 0 number of columns = 4 index size = 0 }
{ unload file name = pomucky_cis_vel.unl number of rows = 0 }
create table "mzdy".pomucky_cis_vel 
  (
    id_velikosti integer not null,
    hodnota char(40) not null,
    pohlavi char(1) not null,
    id_cis integer
  );
revoke all on "mzdy".pomucky_cis_vel from "public";

{ TABLE "mzdy".pomucky_hodnoty row size = 0 number of columns = 3 index size = 0 }
{ unload file name = pomucky_hodnoty.unl number of rows = 0 }
create table "mzdy".pomucky_hodnoty 
  (
    id_atributu integer not null,
    id_na_sklade integer not null,
    hodnota char(100)
  );
revoke all on "mzdy".pomucky_hodnoty from "public";

{ TABLE "mzdy".pomucky_na_sklade row size = 0 number of columns = 9 index size = 0 }
{ unload file name = pomucky_na_sklade.unl number of rows = 0 }
create table "mzdy".pomucky_na_sklade 
  (
    id_na_sklade integer not null,
    id_sklad char(10) not null,
    id_pomucky char(12) not null,
    prij_mn integer not null,
    cena_poriz decimal(16,2),
    cena_akt decimal(16,2),
    dat_znepl date,
    pomu_pozn char(100),
    id_velikosti integer
  );
revoke all on "mzdy".pomucky_na_sklade from "public";

{ TABLE "mzdy".pomu_sklad_prij row size = 0 number of columns = 20 index size = 0 }
{ unload file name = pomu_sklad_prij.unl number of rows = 0 }
create table "mzdy".pomu_sklad_prij 
  (
    sklad char(10) not null,
    cis_pomucky char(12) not null,
    cis_pol integer not null,
    id_prij integer not null,
    cis_prij char(20) not null,
    prij_mn decimal(10,3) not null,
    cena decimal(16,2),
    dat_exp date,
    sarze char(20),
    priznak char(1) not null,
    dat_prij date not null,
    dat_stor date,
    uzivatel char(64) not null,
    id_cis1 integer,
    id_pol1 integer,
    vel1 char(8),
    id_cis2 integer,
    id_pol2 integer,
    vel2 char(8),
    poznamka char(50)
  );
revoke all on "mzdy".pomu_sklad_prij from "public";

create  index "mzdy".idx_pomu_sklpr on "mzdy".pomu_sklad_prij (cis_prij);
{ TABLE "mzdy".pomu_vel_zam row size = 0 number of columns = 14 index size = 0 }
{ unload file name = pomu_vel_zam.unl number of rows = 0 }
create table "mzdy".pomu_vel_zam 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    cis_pomucky char(12) not null,
    id_cis1 integer,
    id_pol1 integer,
    vel1 char(8),
    id_cis2 integer,
    id_pol2 integer,
    vel2 char(8),
    pocet decimal(10,3),
    pouzit char(1) not null,
    z_pm char(1) not null,
    perioda integer,
    datum_zmeny date
  );
revoke all on "mzdy".pomu_vel_zam from "public";

{ TABLE "mzdy".pomu_vyd_gobain row size = 0 number of columns = 9 index size = 0 }
{ unload file name = pomu_vyd_gobain.unl number of rows = 0 }
create table "mzdy".pomu_vyd_gobain 
  (
    rownumber integer not null,
    itemnumber char(12),
    datephysical date,
    qty decimal(10,3),
    employee decimal(10,0),
    itemname char(40),
    costprice decimal(16,2),
    stockunit integer,
    itemident char(50) not null
  );
revoke all on "mzdy".pomu_vyd_gobain from "public";

{ TABLE "mzdy".pomu row size = 0 number of columns = 13 index size = 0 }
{ unload file name = pomu.unl number of rows = 0 }
create table "mzdy".pomu 
  (
    cis_pomucky char(12) not null,
    cis_skup char(7),
    nazev char(70) not null,
    jednotka char(7) not null,
    perioda integer not null,
    vracet char(1) not null,
    vel1 integer not null,
    vel2 integer not null,
    cena decimal(16,2),
    znacka char(30),
    model char(80),
    cis_rizik char(7),
    amortizace char(1)
  );
revoke all on "mzdy".pomu from "public";

{ TABLE "mzdy".pom_zal row size = 0 number of columns = 141 index size = 0 }
{ unload file name = pom_zal.unl number of rows = 53747 }
create table "mzdy".pom_zal 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    druh_pom char(1) not null,
    doba_uvazku char(1) not null,
    prac_str char(10) not null,
    skup_prac char(7),
    prac_kateg integer,
    jkz integer,
    pov_funkce char(12),
    mzd_stup integer,
    trida integer,
    typ_tt integer not null,
    zak_uvazek decimal(4,2) not null,
    hod_uvazek decimal(4,2) not null,
    smena integer,
    duvod_kratsi char(1),
    typ_kal integer not null,
    rozp_kateg char(3),
    vykaz char(3),
    rez_zakazka char(10),
    typ_mzdy integer not null,
    tarif decimal(16,2) not null,
    os_hodn decimal(16,2),
    tarif_cizi decimal(16,4),
    kurz_cizi decimal(16,4),
    pripl_vedeni decimal(16,2),
    pripl_zvlastni decimal(16,2),
    typ_premii integer,
    prem_cast decimal(16,2),
    odpr_pro_dov integer not null,
    neodpr_dny integer not null,
    ex_dov char(1),
    navaz_dov char(1),
    dov_narok decimal(3,1) not null,
    dov_cerpana decimal(5,2) not null,
    dov_kracena decimal(5,2) not null,
    dov_predmin decimal(5,2),
    zbyv_rd_min_rok decimal(5,2) not null,
    rd_letos decimal(5,2) not null,
    dov_dodatk_r decimal(5,2),
    dov_dodatk decimal(5,2),
    trv_dov char(1) not null,
    trv_nem char(1) not null,
    dny_ro_dov decimal(5,1) not null,
    hod_ro_dov decimal(7,2) not null,
    kcs_dov decimal(16,2) not null,
    kcs_dov_1 decimal(16,2) not null,
    kcs_dov_2 decimal(16,2) not null,
    kcs_dov_3 decimal(16,2) not null,
    kcs_dov_4 decimal(16,2) not null,
    prum_dov decimal(16,2),
    min_prum_dov decimal(16,2),
    dny_ro_nem decimal(6,1) not null,
    kcs_nem decimal(16,2) not null,
    prum_nem decimal(16,2),
    min_prum_nem decimal(16,2),
    dny_nemoci integer not null,
    praxe integer,
    praxe_dny integer,
    min_zakl decimal(16,2),
    min_pripl decimal(16,2),
    min_uvazek decimal(4,2),
    min_min_mzda decimal(16,2),
    potl_min_mzdy char(1),
    datum_nastupu date not null,
    duvod_nast char(3),
    datum_zmeny date,
    datum_ukonc date,
    duvod_ukonc char(3),
    zac_nem_poj date,
    eldp_1znak char(1),
    eldp_3znak char(1),
    eldp_akt char(1),
    eldp_nezahrn char(1),
    druh_pom_j char(2),
    zk_doba date,
    kl_po_zam char(4),
    zap_praxe char(8),
    zap_praxe_od date,
    zvys_ps_mes integer,
    zvys_ps_rok integer,
    zvys_ps_dat date,
    id_pracmist integer,
    id_pracmist_2 integer,
    datum_pr_sml date,
    datum_plan_odch date,
    datum_skut_nast date,
    premie_proc_ind decimal(5,2),
    dov_generovat char(1),
    dov_kratit char(1),
    doplnkova_1 char(50),
    doplnkova_2 date,
    cislo_platvym integer,
    cislo_dodatsml integer,
    nahr_hod_uvazek decimal(4,2),
    nahr_typ_kal integer,
    nahr_smena integer,
    jen_duchpoj char(1),
    maly_rozsah char(1),
    dat_doruc_vypov date,
    ucast_duchp_od date,
    misto_vykonu char(50),
    kpd_od date,
    kpd_do date,
    kpd_prum decimal(16,4),
    prum_rok decimal(16,4),
    vychozi_pomer integer,
    c_kmen_pom integer,
    isco08 char(7),
    ind_dn_sk char(1),
    zpusob_ukonc char(7),
    model_pd char(10),
    doch_karta char(15),
    mespr_vypl_nepr char(1),
    id_rez_projekt integer,
    tyd_prac_doba char(1),
    smluv_pom_uv decimal(6,4),
    mes_pom_uv decimal(6,4),
    prum_pom_uv decimal(6,4),
    cislo_sluz_oznac char(3),
    mesice_pracurad integer,
    eldp_vyd_cin_od date,
    legislat_uvazek decimal(4,2),
    id_agentury integer,
    vynimka char(1),
    zpracov_mzdy char(7),
    zpracov_pers char(7),
    mena_cizi char(3),
    ic_prav_vztahu char(15),
    doplnkova_3 char(10),
    odvod_odp_pol_od date,
    odvod_odp_pol_do date,
    naroc_prof_produch char(1),
    garance_castka decimal(16,2),
    homeof_typ_kal integer,
    homeof_smena integer,
    evid decimal(6,3),
    prep decimal(6,3),
    mimo decimal(6,3),
    dov_koef decimal(4,3),
    datum date not null
  );
revoke all on "mzdy".pom_zal from "public";

create  index "mzdy".ix_pom_zal10 on "mzdy".pom_zal (os_cislo, datum, druh_pom);
create  index "mzdy".ix_pom_zal210 on "mzdy".pom_zal (prac_kateg, datum);
create  index "mzdy".ix_pom_zal310 on "mzdy".pom_zal (datum);
{ TABLE "mzdy".pom_mes row size = 0 number of columns = 74 index size = 0 }
{ unload file name = pom_mes.unl number of rows = 30654 }
create table "mzdy".pom_mes 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    druh_pom char(1),
    doba_uvazku char(1),
    prac_str char(10),
    prac_kateg integer,
    mzd_stup integer,
    trida integer,
    zak_uvazek decimal(4,2),
    hod_uvazek decimal(4,2),
    smena integer,
    typ_kal integer,
    rozp_kateg char(3),
    typ_mzdy integer,
    tarif decimal(16,2),
    tarif_cizi decimal(16,4),
    kurz_cizi decimal(16,4),
    fond decimal(5,2),
    odpr_hod decimal(7,2),
    neod_hod decimal(7,2),
    kal_dny integer,
    odpr_dny decimal(5,1),
    neod_dny integer,
    brutto decimal(16,2),
    soc_zakl decimal(16,2),
    zdrav_zakl decimal(16,2),
    potl_min_mzdy char(1),
    datum date not null,
    fond_dny decimal(3,1),
    svatky decimal(7,2),
    svatky_dny decimal(5,1),
    zdrav_zakln decimal(16,2),
    zdrav_zaklp decimal(16,2),
    odpr_pro_dov integer,
    neodpr_dov integer,
    min_mzda decimal(16,2),
    soc_zakl_x decimal(16,2),
    zdrav_zakl_x decimal(16,2),
    zdrav_zakln_x decimal(16,2),
    zdrav_zaklp_x decimal(16,2),
    duch_zakl decimal(16,2),
    jen_duchpoj char(1),
    soc_zakl_0 decimal(16,2),
    duch_zakl_0 decimal(16,2),
    maly_rozsah char(1),
    zak_nar_hr_mzdy decimal(16,2),
    skut_nar_hr_mzdy decimal(16,2),
    sum_zak_poj decimal(16,2),
    soc_zakl_dpp0 decimal(16,2),
    zdrav_zakl_dpp0 decimal(16,2),
    dan_zakl decimal(16,2),
    druh_pom_j char(2),
    typ_dohody integer,
    duch_spor_zakl decimal(16,2),
    soc_zakl_e101 decimal(16,2),
    zdrav_zakl_e101 decimal(16,2),
    ind_dn_sk char(2),
    zdrav_poj_odpoc decimal(16,2),
    vynimka char(1),
    zakl_zak_poj decimal(16,2),
    ic_prav_vztahu char(15),
    sp_podn_odv decimal(16,2),
    zp_podn_odv decimal(16,2),
    financ_podp char(1),
    odvod_odp_pol_od date,
    odvod_odp_pol_do date,
    sp_sleva integer,
    sp_vyssi integer,
    sp_sleva_druh char(1),
    sp_sleva_neprizn char(1),
    min_predd_dopl decimal(16,2),
    legislat_uvazek decimal(4,2),
    smluv_pom_uv decimal(6,4),
    soc_zakl_bezny decimal(16,2)
  );
revoke all on "mzdy".pom_mes from "public";

create unique  index "mzdy".ix_pom_mes on "mzdy".pom_mes (os_cislo, cislo_pom, datum);
{ TABLE "mzdy".pobocky row size = 0 number of columns = 14 index size = 0 }
{ unload file name = pobocky.unl number of rows = 0 }
create table "mzdy".pobocky 
  (
    pobocka integer not null,
    nazev char(30),
    ulice char(30),
    cislo char(14),
    misto char(48),
    psc char(5),
    nuts char(6),
    okec integer,
    var_symb char(10),
    kod_ossz integer,
    nazev_ossz char(27),
    pf_kod_zam char(10),
    id_osoby_fu integer,
    dic_pokl char(10)
  );
revoke all on "mzdy".pobocky from "public";

{ TABLE "mzdy".pln_norem row size = 0 number of columns = 6 index size = 0 }
{ unload file name = pln_norem.unl number of rows = 0 }
create table "mzdy".pln_norem 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    norma char(10) not null,
    ks integer,
    obdobi date
  );
revoke all on "mzdy".pln_norem from "public";

create  index "mzdy".ix_pln_nor1 on "mzdy".pln_norem (os_cislo, cislo_pom, obdobi);
create  index "mzdy".ix_pln_nor2 on "mzdy".pln_norem (os_cislo, cislo_pom, norma, obdobi);
{ TABLE "mzdy".platci row size = 0 number of columns = 3 index size = 0 }
{ unload file name = platci.unl number of rows = 0 }
create table "mzdy".platci 
  (
    cislo integer not null,
    nazev char(40) not null,
    adresa char(50)
  );
revoke all on "mzdy".platci from "public";

{ TABLE "mzdy".platce row size = 0 number of columns = 7 index size = 0 }
{ unload file name = platce.unl number of rows = 0 }
create table "mzdy".platce 
  (
    cislo integer not null,
    nazev char(30) not null,
    ulice char(30),
    misto char(48),
    psc char(5),
    dat_od date,
    dat_do date
  );
revoke all on "mzdy".platce from "public";

create unique  index "mzdy".ix_platce on "mzdy".platce (cislo);
{ TABLE "mzdy".plneni row size = 0 number of columns = 6 index size = 0 }
{ unload file name = plneni.unl number of rows = 0 }
create table "mzdy".plneni 
  (
    kod integer not null,
    planovano decimal(16,8),
    skutecnost decimal(16,8),
    plneni decimal(8,4),
    upraveno decimal(8,4),
    obdobi date
  );
revoke all on "mzdy".plneni from "public";

create  index "mzdy".ix_plneni on "mzdy".plneni (kod, upraveno, obdobi);
{ TABLE "mzdy".podm_mzdy row size = 0 number of columns = 15 index size = 0 }
{ unload file name = podm_mzdy.unl number of rows = 0 }
create table "mzdy".podm_mzdy 
  (
    id integer not null,
    ident char(10) not null,
    popis char(60),
    typ_podm_1 integer,
    hodn_podm_1 char(12),
    typ_podm_2 integer,
    hodn_podm_2 char(12),
    typ_podm_3 integer,
    hodn_podm_3 char(12),
    typ_podm_4 integer,
    hodn_podm_4 char(12),
    operace integer,
    hodn_oper_1 char(12),
    hodn_oper_2 decimal(16,2),
    status char(1)
  );
revoke all on "mzdy".podm_mzdy from "public";

create  index "mzdy".ix_podm_mzdy_1 on "mzdy".podm_mzdy (ident);
create  index "mzdy".ix_podm_mzdy_2 on "mzdy".podm_mzdy (operace);
{ TABLE "mzdy".plugin_audit row size = 0 number of columns = 4 index size = 0 }
{ unload file name = plugin_audit.unl number of rows = 0 }
create table "mzdy".plugin_audit 
  (
    session_id integer not null,
    uuid char(40) not null,
    verze decimal(3,1) not null,
    dat_spusteni char(19) not null
  );
revoke all on "mzdy".plugin_audit from "public";

{ TABLE "mzdy".podpisove_vzory row size = 0 number of columns = 1 index size = 0 }
{ unload file name = podpisove_vzory.unl number of rows = 0 }
create table "mzdy".podpisove_vzory 
  (
    podpis_format char(3) not null
  );
revoke all on "mzdy".podpisove_vzory from "public";

{ TABLE "mzdy".platby_rozpad row size = 0 number of columns = 12 index size = 0 }
{ unload file name = platby_rozpad.unl number of rows = 0 }
create table "mzdy".platby_rozpad 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    kod integer not null,
    c_dokladu integer not null,
    castka decimal(16,2),
    akce char(1) not null,
    id_osoby integer,
    id_bank_spoj integer,
    konst_symb char(4),
    var_symb char(10),
    spec_symb char(10),
    datum date not null
  );
revoke all on "mzdy".platby_rozpad from "public";

create  index "mzdy".ix_plroz on "mzdy".platby_rozpad (os_cislo, c_dokladu, kod, datum);
create  index "mzdy".ix_plroz2 on "mzdy".platby_rozpad (id_osoby, id_bank_spoj, kod, akce, datum);
{ TABLE "mzdy".pomu_sklad row size = 0 number of columns = 21 index size = 0 }
{ unload file name = pomu_sklad.unl number of rows = 0 }
create table "mzdy".pomu_sklad 
  (
    sklad char(10) not null,
    cis_pomucky char(12) not null,
    cis_pol integer not null,
    prij_mn decimal(10,3) not null,
    vyd_mn decimal(10,3) not null,
    min_mn decimal(10,3) not null,
    cena decimal(16,2),
    dat_exp date,
    posl_oper integer not null,
    id_cis1 integer,
    id_pol1 integer,
    vel1 char(8),
    id_cis2 integer,
    id_pol2 integer,
    vel2 char(8),
    znacka char(30),
    model char(80),
    inv_cislo char(20),
    vyr_cislo char(30),
    pomu_pozn char(50),
    dat_znepl date
  );
revoke all on "mzdy".pomu_sklad from "public";

{ TABLE "mzdy".pomu_rizika row size = 0 number of columns = 3 index size = 0 }
{ unload file name = pomu_rizika.unl number of rows = 0 }
create table "mzdy".pomu_rizika 
  (
    cis_pomucky char(12) not null,
    kod_casti_tela char(7) not null,
    kod_rizika char(7) not null
  );
revoke all on "mzdy".pomu_rizika from "public";

create  index "mzdy".ix_pomu_riz on "mzdy".pomu_rizika (cis_pomucky);
{ TABLE "mzdy".pomu_nar_str row size = 0 number of columns = 5 index size = 0 }
{ unload file name = pomu_nar_str.unl number of rows = 0 }
create table "mzdy".pomu_nar_str 
  (
    str char(10) not null,
    vykaz char(3),
    cis_pomucky char(12) not null,
    pocet decimal(10,3) not null,
    perioda integer not null
  );
revoke all on "mzdy".pomu_nar_str from "public";

{ TABLE "mzdy".pomu_cis_detail row size = 0 number of columns = 5 index size = 0 }
{ unload file name = pomu_cis_detail.unl number of rows = 36 }
create table "mzdy".pomu_cis_detail 
  (
    id_cis integer not null,
    id_pol integer not null,
    hod_pol char(20) not null,
    pohl char(1) not null,
    ext_hodn char(20)
  );
revoke all on "mzdy".pomu_cis_detail from "public";

{ TABLE "mzdy".pomu_cis row size = 0 number of columns = 2 index size = 0 }
{ unload file name = pomu_cis.unl number of rows = 0 }
create table "mzdy".pomu_cis 
  (
    id_cis integer not null,
    naz_cis char(20)
  );
revoke all on "mzdy".pomu_cis from "public";

{ TABLE "mzdy".plan_mzdp_zi row size = 0 number of columns = 39 index size = 0 }
{ unload file name = plan_mzdp_zi.unl number of rows = 0 }
create table "mzdy".plan_mzdp_zi 
  (
    id_planu integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    prijmeni char(40),
    jmeno char(40),
    titul char(25),
    titul_za char(15),
    datum_nastupu date,
    datum_plan_odch date,
    datum_ukonc date,
    prac_kateg integer,
    id_pracmist integer,
    prac_str char(10),
    skup_str integer,
    cis_divize integer,
    druh_pom char(1),
    maly_rozsah char(1),
    mzd_stup integer,
    trida integer,
    tarif decimal(16,2),
    tarif_pred decimal(16,2),
    tarif_navys decimal(16,2),
    tarif_po decimal(16,2),
    prum_dov decimal(16,2),
    prum_dov_pred decimal(16,2),
    predp_prum_dov decimal(16,2),
    typ_mzdy integer,
    typ_tt integer,
    typ_premii integer,
    typ_kal integer,
    smena integer,
    hod_uvazek decimal(4,2),
    zak_uvazek decimal(4,2),
    fond decimal(5,2),
    dov decimal(5,2),
    svatek decimal(5,2),
    odpr_hod_sv decimal(5,2),
    jednotka char(1),
    skup_prac char(7)
  );
revoke all on "mzdy".plan_mzdp_zi from "public";

{ TABLE "mzdy".plan_mzdp_str_h row size = 0 number of columns = 3 index size = 0 }
{ unload file name = plan_mzdp_str_h.unl number of rows = 0 }
create table "mzdy".plan_mzdp_str_h 
  (
    id_str integer not null,
    nazev char(50),
    posl_id_rad integer not null
  );
revoke all on "mzdy".plan_mzdp_str_h from "public";

{ TABLE "mzdy".plan_mzdp_str_d row size = 0 number of columns = 17 index size = 0 }
{ unload file name = plan_mzdp_str_d.unl number of rows = 0 }
create table "mzdy".plan_mzdp_str_d 
  (
    id_str integer not null,
    id_rad integer not null,
    poradi integer not null,
    typ char(1),
    nazev char(50),
    mzd_pol char(2000),
    atr_pm char(1000),
    prednast_hod char(1),
    bg_col integer,
    fg_col integer,
    font char(20),
    vel_font integer,
    bold char(1),
    italic char(1),
    underline char(1),
    strikeout char(1),
    proc_nav char(1)
  );
revoke all on "mzdy".plan_mzdp_str_d from "public";

{ TABLE "mzdy".plan_mzdp_pristup row size = 0 number of columns = 5 index size = 0 }
{ unload file name = plan_mzdp_pristup.unl number of rows = 0 }
create table "mzdy".plan_mzdp_pristup 
  (
    id_planu integer not null,
    uzivatel char(64) not null,
    prohlizeni char(1),
    oprava char(1),
    tisk char(1)
  );
revoke all on "mzdy".plan_mzdp_pristup from "public";

{ TABLE "mzdy".plan_mzdp_h row size = 0 number of columns = 29 index size = 0 }
{ unload file name = plan_mzdp_h.unl number of rows = 0 }
create table "mzdy".plan_mzdp_h 
  (
    id_str integer not null,
    id_planu integer not null,
    nazev char(100),
    param char(1000),
    dat_od date,
    dat_do date,
    zobr_plan char(13),
    zobr_skut char(13),
    zobr_rozd char(13),
    zobr_zaklinfo char(100),
    zobr_ukaz char(100),
    skupiny char(100),
    trideni char(200),
    soucty char(1),
    treeview char(1),
    celkem char(1),
    celkem_od date,
    celkem_do date,
    k_dispozici decimal(12,0),
    naplanovano decimal(12,0),
    skutecnost decimal(12,0),
    zp_tvorby char(1),
    zalozil char(64) not null,
    zmenil char(64) not null,
    datum date,
    cas char(8),
    proc_navys decimal(5,2),
    param1 decimal(10,2),
    param2 decimal(10,2)
  );
revoke all on "mzdy".plan_mzdp_h from "public";

{ TABLE "mzdy".plan_mzdp_doplinf row size = 0 number of columns = 4 index size = 0 }
{ unload file name = plan_mzdp_doplinf.unl number of rows = 0 }
create table "mzdy".plan_mzdp_doplinf 
  (
    id_planu integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    skupiny char(20)
  );
revoke all on "mzdy".plan_mzdp_doplinf from "public";

{ TABLE "mzdy".plan_mzdp_d row size = 0 number of columns = 9 index size = 0 }
{ unload file name = plan_mzdp_d.unl number of rows = 0 }
create table "mzdy".plan_mzdp_d 
  (
    id_planu integer not null,
    id_rad integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    kod integer not null,
    datum date,
    mes integer not null,
    plan_hod decimal(16,2),
    skut_hod decimal(16,2)
  );
revoke all on "mzdy".plan_mzdp_d from "public";

{ TABLE "mzdy".plan_mzdp_mp_th row size = 0 number of columns = 2 index size = 0 }
{ unload file name = plan_mzdp_mp_th.unl number of rows = 0 }
create table "mzdy".plan_mzdp_mp_th 
  (
    kod integer not null,
    typ integer
  );
revoke all on "mzdy".plan_mzdp_mp_th from "public";

{ TABLE "mzdy".plan_mzdp_budtar row size = 0 number of columns = 7 index size = 0 }
{ unload file name = plan_mzdp_budtar.unl number of rows = 0 }
create table "mzdy".plan_mzdp_budtar 
  (
    plati_od date not null,
    typ_tt integer not null,
    typ_mzdy integer,
    trida integer,
    mzd_stup integer,
    odp_roky integer,
    zakl_tarif decimal(16,2)
  );
revoke all on "mzdy".plan_mzdp_budtar from "public";

create unique  index "mzdy".ix_plan_mzdp_btar on "mzdy".plan_mzdp_budtar (plati_od, typ_tt, typ_mzdy, trida, mzd_stup);
{ TABLE "mzdy".pichacky_kpd_vyp row size = 0 number of columns = 19 index size = 0 }
{ unload file name = pichacky_kpd_vyp.unl number of rows = 0 }
create table "mzdy".pichacky_kpd_vyp 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    prac_str char(10) not null,
    kod integer not null,
    c_dokladu integer,
    dat_od date,
    dat_do date,
    dny decimal(5,1),
    hodiny decimal(7,2),
    sazba decimal(16,2),
    castka decimal(16,2) not null,
    prizn_aut char(1) not null,
    prac_kateg integer not null,
    datum date not null,
    id_podniku integer not null,
    id_vazby integer,
    typ_vazby char(2),
    id_vazby2 integer,
    typ_vazby2 char(2)
  );
revoke all on "mzdy".pichacky_kpd_vyp from "public";

create  index "mzdy".ix_pich10_vyp on "mzdy".pichacky_kpd_vyp (os_cislo, datum);
create  index "mzdy".ix_kod10_vyp on "mzdy".pichacky_kpd_vyp (kod, datum);
create  index "mzdy".ix_pich_dat10_vyp on "mzdy".pichacky_kpd_vyp (datum, kod, prac_str);
create  index "mzdy".ix_pich_osk10_vyp on "mzdy".pichacky_kpd_vyp (os_cislo, kod, datum);
create  index "mzdy".ix_pich_110_vyp on "mzdy".pichacky_kpd_vyp (os_cislo, datum, kod);
create  index "mzdy".ix_pich_310_vyp on "mzdy".pichacky_kpd_vyp (kod, os_cislo, cislo_pom, datum);
create  index "mzdy".ix_pich_410_vyp on "mzdy".pichacky_kpd_vyp (os_cislo, cislo_pom, datum);
create  index "mzdy".ix_pich_510_vyp on "mzdy".pichacky_kpd_vyp (os_cislo, cislo_pom, kod, datum);
create  index "mzdy".ix_pich_610_vyp on "mzdy".pichacky_kpd_vyp (prac_str, kod, datum);
create  index "mzdy".ix_pich_710_vyp on "mzdy".pichacky_kpd_vyp (typ_vazby, id_vazby);
create  index "mzdy".ix_pich_810_vyp on "mzdy".pichacky_kpd_vyp (typ_vazby2, id_vazby2);
create  index "mzdy".ix_pich_910_vyp on "mzdy".pichacky_kpd_vyp (os_cislo, cislo_pom, kod, c_dokladu, dat_od, dat_do);
{ TABLE "mzdy".pichacky_kpd row size = 0 number of columns = 19 index size = 0 }
{ unload file name = pichacky_kpd.unl number of rows = 0 }
create table "mzdy".pichacky_kpd 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    prac_str char(10) not null,
    kod integer not null,
    c_dokladu integer,
    dat_od date,
    dat_do date,
    dny decimal(5,1),
    hodiny decimal(7,2),
    sazba decimal(16,2),
    castka decimal(16,2) not null,
    prizn_aut char(1) not null,
    prac_kateg integer not null,
    datum date not null,
    id_podniku integer not null,
    id_vazby integer,
    typ_vazby char(2),
    id_vazby2 integer,
    typ_vazby2 char(2)
  );
revoke all on "mzdy".pichacky_kpd from "public";

create  index "mzdy".ix_pich10_kpd on "mzdy".pichacky_kpd (os_cislo, datum);
create  index "mzdy".ix_kod10_kpd on "mzdy".pichacky_kpd (kod, datum);
create  index "mzdy".ix_pich_dat10_kpd on "mzdy".pichacky_kpd (datum, kod, prac_str);
create  index "mzdy".ix_pich_osk10_kpd on "mzdy".pichacky_kpd (os_cislo, kod, datum);
create  index "mzdy".ix_pich_110_kpd on "mzdy".pichacky_kpd (os_cislo, datum, kod);
create  index "mzdy".ix_pich_310_kpd on "mzdy".pichacky_kpd (kod, os_cislo, cislo_pom, datum);
create  index "mzdy".ix_pich_410_kpd on "mzdy".pichacky_kpd (os_cislo, cislo_pom, datum);
create  index "mzdy".ix_pich_510_kpd on "mzdy".pichacky_kpd (os_cislo, cislo_pom, kod, datum);
create  index "mzdy".ix_pich_610_kpd on "mzdy".pichacky_kpd (prac_str, kod, datum);
create  index "mzdy".ix_pich_710_kpd on "mzdy".pichacky_kpd (typ_vazby, id_vazby);
create  index "mzdy".ix_pich_810_kpd on "mzdy".pichacky_kpd (typ_vazby2, id_vazby2);
create  index "mzdy".ix_pich_910_kpd on "mzdy".pichacky_kpd (os_cislo, cislo_pom, kod, c_dokladu, dat_od, dat_do);
{ TABLE "mzdy".pichacky row size = 0 number of columns = 19 index size = 0 }
{ unload file name = pichacky.unl number of rows = 376615 }
create table "mzdy".pichacky 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    prac_str char(10) not null,
    kod integer not null,
    c_dokladu integer,
    dat_od date,
    dat_do date,
    dny decimal(5,1),
    hodiny decimal(7,2),
    sazba decimal(16,2),
    castka decimal(16,2) not null,
    prizn_aut char(1) not null,
    prac_kateg integer not null,
    datum date not null,
    id_podniku integer not null,
    id_vazby integer,
    typ_vazby char(2),
    id_vazby2 integer,
    typ_vazby2 char(2)
  );
revoke all on "mzdy".pichacky from "public";

create  index "mzdy".ix_pich on "mzdy".pichacky (os_cislo, datum);
create  index "mzdy".ix_kod on "mzdy".pichacky (kod, datum);
create  index "mzdy".ix_pich_dat on "mzdy".pichacky (datum, kod, prac_str);
create  index "mzdy".ix_pich_osk on "mzdy".pichacky (os_cislo, kod, datum);
create  index "mzdy".ix_pich_1 on "mzdy".pichacky (os_cislo, datum, kod);
create  index "mzdy".ix_pich_3 on "mzdy".pichacky (kod, os_cislo, cislo_pom, datum);
create  index "mzdy".ix_pich_4 on "mzdy".pichacky (os_cislo, cislo_pom, datum);
create  index "mzdy".ix_pich_5 on "mzdy".pichacky (os_cislo, cislo_pom, kod, datum);
create  index "mzdy".ix_pich_6 on "mzdy".pichacky (prac_str, kod, datum);
create  index "mzdy".ix_pich_7 on "mzdy".pichacky (typ_vazby, id_vazby);
create  index "mzdy".ix_pich_8 on "mzdy".pichacky (typ_vazby2, id_vazby2);
create  index "mzdy".ix_pich_9 on "mzdy".pichacky (os_cislo, cislo_pom, kod, c_dokladu, dat_od, dat_do);
{ TABLE "mzdy".pichac_pom row size = 0 number of columns = 13 index size = 0 }
{ unload file name = pichac_pom.unl number of rows = 0 }
create table "mzdy".pichac_pom 
  (
    os_cislo decimal(10,0),
    cislo_pom integer,
    prac_str char(10),
    kod integer,
    c_dokladu integer,
    dat_od date,
    dat_do date,
    dny decimal(3,1),
    hodiny decimal(5,2),
    sazba decimal(16,2),
    castka decimal(16,2),
    prizn_aut char(1),
    prac_kateg integer
  );
revoke all on "mzdy".pichac_pom from "public";

create  index "mzdy".ix_pich_pom1 on "mzdy".pichac_pom (os_cislo, kod, prac_str);
{ TABLE "mzdy".pev_pozadav row size = 0 number of columns = 9 index size = 0 }
{ unload file name = pev_pozadav.unl number of rows = 0 }
create table "mzdy".pev_pozadav 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    trida integer,
    typ_mzdy integer not null,
    stupen_vzd char(1) not null,
    praxe integer not null,
    c1 char(20),
    c2 char(20),
    c3 char(20)
  );
revoke all on "mzdy".pev_pozadav from "public";

create  index "mzdy".ix_pev_pozadav on "mzdy".pev_pozadav (os_cislo);
{ TABLE "mzdy".penz_prip row size = 0 number of columns = 12 index size = 0 }
{ unload file name = penz_prip.unl number of rows = 0 }
create table "mzdy".penz_prip 
  (
    os_cislo decimal(10,0) not null,
    c_dokladu integer not null,
    castka decimal(16,2) not null,
    banka char(4),
    platba char(20),
    konst_symb char(4),
    var_symb char(10),
    spec_symb char(10),
    dat_od date,
    dat_do date,
    cislo_pf integer not null,
    datum_uzav_sml date
  );
revoke all on "mzdy".penz_prip from "public";

{ TABLE "mzdy".pf_narok_podle_let row size = 0 number of columns = 7 index size = 0 }
{ unload file name = pf_narok_podle_let.unl number of rows = 0 }
create table "mzdy".pf_narok_podle_let 
  (
    id integer not null,
    typ_fondu char(20) not null,
    let_od integer not null,
    let_do integer,
    hodnota decimal(10,2) not null,
    indik char(1) not null,
    max_castka decimal(16,2)
  );
revoke all on "mzdy".pf_narok_podle_let from "public";

create unique  index "mzdy".ix_pf_n_odpr on "mzdy".pf_narok_podle_let (typ_fondu, let_od, let_do);
{ TABLE "mzdy".param_pp row size = 0 number of columns = 5 index size = 0 }
{ unload file name = param_pp.unl number of rows = 10 }
create table "mzdy".param_pp 
  (
    ident integer not null,
    operace char(1) not null,
    pp_kod integer not null,
    pp_srazky char(100) not null,
    id_podniku integer not null
  );
revoke all on "mzdy".param_pp from "public";

{ TABLE "mzdy".par_ucty_tyco row size = 0 number of columns = 7 index size = 0 }
{ unload file name = par_ucty_tyco.unl number of rows = 848 }
create table "mzdy".par_ucty_tyco 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    id_zazn integer not null,
    dat_od date not null,
    dat_do date,
    stred char(23) not null,
    koef decimal(6,3) not null
  );
revoke all on "mzdy".par_ucty_tyco from "public";

{ TABLE "mzdy".par_mzdy_zal row size = 0 number of columns = 67 index size = 0 }
{ unload file name = par_mzdy_zal.unl number of rows = 0 }
create table "mzdy".par_mzdy_zal 
  (
    nazev1 char(40),
    nazev2 char(40),
    zkr_naz char(30),
    ulice char(20),
    misto char(48),
    psc char(5),
    dico char(3),
    ico char(8),
    cislo_banky char(4),
    nazev_banky char(30),
    cislo_uctu char(20),
    nazev_pobocky char(20),
    cis_pod_sporit char(5),
    typ_org char(1) not null,
    typ_osc char(1) not null,
    typ_kodu char(1) not null,
    rez_kateg char(1) not null,
    typ_uvazku char(1) not null,
    zak_uvazek decimal(3,2) not null,
    dopl_presc char(1) not null,
    typ_roh char(1) not null,
    cast_roh integer,
    cast_sraz char(1) not null,
    zal_post char(1) not null,
    mzdy_post char(1) not null,
    pen_str char(1) not null,
    mince char(1) not null,
    zap_dluhy char(1) not null,
    zpet_propl char(1) not null,
    spec char(1) not null,
    nouze char(1) not null,
    navys_dov integer not null,
    krac_dov char(1),
    svatky_thp char(1) not null,
    aut_pich char(1) not null,
    ucet char(1) not null,
    zac_cyklu date,
    valor char(1) not null,
    poc_val char(1) not null,
    mes_min_mzda decimal(16,2),
    hod_min_mzda decimal(16,3) not null,
    max_prum_nem decimal(16,2),
    mes_rod_prisp decimal(16,2),
    den_rod_prisp decimal(16,2),
    zakl_odp decimal(16,2) not null,
    dite_odp decimal(16,2) not null,
    stud_odp decimal(16,2) not null,
    cast_inv_odp decimal(16,2) not null,
    upl_inv_odp decimal(16,2) not null,
    ztp_p_odp decimal(16,2) not null,
    proc_soc_zam decimal(4,2) not null,
    proc_soc_pod decimal(4,2) not null,
    proc_soc_pod2 decimal(4,2) not null,
    proc_zdr_cel decimal(4,2) not null,
    proc_vym_zakl decimal(7,2),
    zam_uziv char(24),
    mena char(3) not null,
    nuts char(8),
    okec char(5),
    pforma integer,
    finkont integer,
    kolsml char(1),
    zakonodm char(1),
    dopl_text char(100),
    datum_prvni date,
    datum_posledni date,
    datum date
  );
revoke all on "mzdy".par_mzdy_zal from "public";

{ TABLE "mzdy".par_mzdy_o row size = 0 number of columns = 9 index size = 0 }
{ unload file name = par_mzdy_o.unl number of rows = 0 }
create table "mzdy".par_mzdy_o 
  (
    nuts char(6),
    okec integer,
    pforma integer,
    finkont integer,
    kolsml char(1),
    zakonodm char(1),
    dopl_text char(100),
    datum_prvni date,
    datum_posledni date
  );
revoke all on "mzdy".par_mzdy_o from "public";

{ TABLE "mzdy".par_mzdy row size = 0 number of columns = 66 index size = 0 }
{ unload file name = par_mzdy.unl number of rows = 1 }
create table "mzdy".par_mzdy 
  (
    nazev1 char(40),
    nazev2 char(40),
    zkr_naz char(30),
    ulice char(20),
    misto char(48),
    psc char(5),
    dico char(3),
    ico char(8),
    cislo_banky char(4),
    nazev_banky char(30),
    cislo_uctu char(20),
    nazev_pobocky char(20),
    cis_pod_sporit char(5),
    typ_org char(1) not null,
    typ_osc char(1) not null,
    typ_kodu char(1) not null,
    rez_kateg char(1) not null,
    typ_uvazku char(1) not null,
    zak_uvazek decimal(3,2) not null,
    dopl_presc char(1) not null,
    typ_roh char(1) not null,
    cast_roh integer,
    cast_sraz char(1) not null,
    zal_post char(1) not null,
    mzdy_post char(1) not null,
    pen_str char(1) not null,
    mince char(1) not null,
    zap_dluhy char(1) not null,
    zpet_propl char(1) not null,
    spec char(1) not null,
    nouze char(1) not null,
    navys_dov integer not null,
    krac_dov char(1),
    svatky_thp char(1) not null,
    aut_pich char(1) not null,
    ucet char(1) not null,
    zac_cyklu date,
    valor char(1) not null,
    poc_val char(1) not null,
    mes_min_mzda decimal(16,2),
    hod_min_mzda decimal(16,3) not null,
    max_prum_nem decimal(16,2),
    mes_rod_prisp decimal(16,2),
    den_rod_prisp decimal(16,2),
    zakl_odp decimal(16,2) not null,
    dite_odp decimal(16,2) not null,
    stud_odp decimal(16,2) not null,
    cast_inv_odp decimal(16,2) not null,
    upl_inv_odp decimal(16,2) not null,
    ztp_p_odp decimal(16,2) not null,
    proc_soc_zam decimal(4,2) not null,
    proc_soc_pod decimal(4,2) not null,
    proc_soc_pod2 decimal(4,2) not null,
    proc_zdr_cel decimal(4,2) not null,
    proc_vym_zakl decimal(7,2),
    zam_uziv char(24),
    mena char(3) not null,
    nuts char(8),
    okec char(5),
    pforma integer,
    finkont integer,
    kolsml char(1),
    zakonodm char(1),
    dopl_text char(100),
    datum_prvni date,
    datum_posledni date
  );
revoke all on "mzdy".par_mzdy from "public";

{ TABLE "mzdy".par_map row size = 0 number of columns = 3 index size = 0 }
{ unload file name = par_map.unl number of rows = 1 }
create table "mzdy".par_map 
  (
    id_podniku integer not null,
    datum_prvni date,
    datum_posledni date
  );
revoke all on "mzdy".par_map from "public";

{ TABLE "mzdy".par_doch row size = 0 number of columns = 39 index size = 0 }
{ unload file name = par_doch.unl number of rows = 0 }
create table "mzdy".par_doch 
  (
    id integer not null,
    skup integer not null,
    poradi integer,
    tagname char(15),
    popisek char(20),
    porizovani char(1),
    predvyplneni char(1),
    prescasy char(1),
    kody char(150),
    zb_kody char(1),
    mes_zpet integer,
    mes_vpred integer,
    prest_po integer,
    delka_prest integer,
    ranni_od integer,
    odpol_od integer,
    nocni_od integer,
    def_barva char(16),
    typ_prav integer,
    odpol_podle char(2),
    odpol char(20),
    nocni_podle char(2),
    nocni char(20),
    vikend_podle char(2),
    vikend char(20),
    svatek_podle char(2),
    svatek char(20),
    prescb_podle char(2),
    prescb char(20),
    prescs_podle char(2),
    prescs char(20),
    prescn_podle char(2),
    prescn char(20),
    prescf_podle char(2),
    prescf char(20),
    prescsv_podle char(2),
    prescsv char(20),
    prescsv_week char(1),
    sum_pripl char(1)
  );
revoke all on "mzdy".par_doch from "public";

{ TABLE "mzdy".p_kateg row size = 0 number of columns = 9 index size = 0 }
{ unload file name = p_kateg.unl number of rows = 4 }
create table "mzdy".p_kateg 
  (
    cis_kat integer not null,
    naz_kat char(10),
    druh_kat char(1),
    druh_mzdy char(1),
    sloupec_1 integer,
    sloupec_2 integer,
    urednik integer,
    org char(13),
    kat_eng char(30)
  );
revoke all on "mzdy".p_kateg from "public";

{ TABLE "mzdy".osoby_typ row size = 0 number of columns = 16 index size = 0 }
{ unload file name = osoby_typ.unl number of rows = 141 }
create table "mzdy".osoby_typ 
  (
    id_osoby integer not null,
    typ char(2) not null,
    c_pole1 char(50),
    c_pole2 char(50),
    c_pole3 char(50),
    c_pole4 char(50),
    c_pole5 char(50),
    n_pole1 integer,
    n_pole2 integer,
    n_pole3 integer,
    n_pole4 integer,
    t_pole1 char(250),
    obd_ukonc date,
    t_pole2 char(250),
    t_pole3 char(250),
    t_pole4 char(250)
  );
revoke all on "mzdy".osoby_typ from "public";

create  index "mzdy".ix_osoby_typ on "mzdy".osoby_typ (typ, c_pole1);
create  index "mzdy".ix_osoby_typ1 on "mzdy".osoby_typ (typ, id_osoby, c_pole2, c_pole3, n_pole4);
{ TABLE "mzdy".osoby row size = 0 number of columns = 32 index size = 0 }
{ unload file name = osoby.unl number of rows = 141 }
create table "mzdy".osoby 
  (
    id_osoby integer not null,
    id_osoby_nad integer,
    vztah char(7),
    pravni_forma char(7) not null,
    ico char(8),
    dico char(14),
    nazev char(150),
    nazev2 char(40),
    nazev_zkr char(30),
    prijmeni char(40),
    jmeno char(40),
    titul char(25),
    titul_za char(10),
    rodne_cislo char(10),
    ulice char(60),
    sam_ulice char(45),
    cislo_domu char(14),
    misto char(48),
    psc char(5),
    stat char(2),
    telefon char(50),
    fax char(50),
    mobil char(50),
    e_mail char(50),
    http char(50),
    c_zriz_list char(30),
    poznamka char(50),
    pozn2datum date,
    ico_ext char(2),
    id_podniku integer not null,
    archivni integer,
    dat_schranka char(7)
  );
revoke all on "mzdy".osoby from "public";

create  index "mzdy".ix_osoby_podnik on "mzdy".osoby (id_podniku);
{ TABLE "mzdy".pichacky_st row size = 0 number of columns = 14 index size = 0 }
{ unload file name = pichacky_st.unl number of rows = 0 }
create table "mzdy".pichacky_st 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    prac_str char(10),
    kod integer,
    c_dokladu integer,
    dat_od date,
    dat_do date,
    dny decimal(7,1),
    hodiny decimal(7,2),
    sazba decimal(16,2),
    castka decimal(16,2),
    prizn_aut char(1),
    prac_kateg integer,
    datum date
  );
revoke all on "mzdy".pichacky_st from "public";

create  index "mzdy".ix_pichs on "mzdy".pichacky_st (os_cislo, cislo_pom, datum);
create  index "mzdy".ix_kods on "mzdy".pichacky_st (kod, datum);
create  index "mzdy".ix_pich_dats on "mzdy".pichacky_st (datum, kod, prac_str);
create  index "mzdy".ix_pich_osks on "mzdy".pichacky_st (os_cislo, cislo_pom, kod, datum);
{ TABLE "mzdy".pichacky_rozpad row size = 0 number of columns = 19 index size = 0 }
{ unload file name = pichacky_rozpad.unl number of rows = 0 }
create table "mzdy".pichacky_rozpad 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    prac_str char(10) not null,
    kod integer not null,
    c_dokladu integer,
    dat_od date,
    dat_do date,
    dny decimal(5,1),
    hodiny decimal(7,2),
    sazba decimal(16,2),
    castka decimal(16,2) not null,
    prizn_aut char(1) not null,
    prac_kateg integer not null,
    datum date not null,
    id_podniku integer not null,
    id_vazby integer,
    typ_vazby char(2),
    id_vazby2 integer,
    typ_vazby2 char(2)
  );
revoke all on "mzdy".pichacky_rozpad from "public";

create  index "mzdy".ix_pich_rozp_1 on "mzdy".pichacky_rozpad (os_cislo, datum);
create  index "mzdy".ix_pich_rozp_2 on "mzdy".pichacky_rozpad (kod, datum);
create  index "mzdy".ix_pich_rozp_3 on "mzdy".pichacky_rozpad (datum, kod, prac_str);
create  index "mzdy".ix_pich_rozp_4 on "mzdy".pichacky_rozpad (os_cislo, kod, datum);
create  index "mzdy".ix_pich_rozp_5 on "mzdy".pichacky_rozpad (os_cislo, datum, kod);
create  index "mzdy".ix_pich_rozp_6 on "mzdy".pichacky_rozpad (kod, os_cislo, cislo_pom, datum);
create  index "mzdy".ix_pich_rozp_7 on "mzdy".pichacky_rozpad (os_cislo, cislo_pom, datum);
create  index "mzdy".ix_pich_rozp_8 on "mzdy".pichacky_rozpad (os_cislo, cislo_pom, kod, datum);
create  index "mzdy".ix_pich_rozp_9 on "mzdy".pichacky_rozpad (prac_str, kod, datum);
create  index "mzdy".ix_pich_rozp_10 on "mzdy".pichacky_rozpad (typ_vazby, id_vazby);
create  index "mzdy".ix_pich_rozp_11 on "mzdy".pichacky_rozpad (typ_vazby2, id_vazby2);
create  index "mzdy".ix_pich_rozp_12 on "mzdy".pichacky_rozpad (os_cislo, cislo_pom, kod, c_dokladu, dat_od, dat_do);
{ TABLE "mzdy".org_verze row size = 0 number of columns = 9 index size = 0 }
{ unload file name = org_verze.unl number of rows = 16984 }
create table "mzdy".org_verze 
  (
    os_cislo decimal(10,0),
    cislo_pom integer,
    operace char(1) not null,
    agenda char(30),
    datum date not null,
    cas char(6) not null,
    obdobi date not null,
    verze char(10) not null,
    uziv char(64) not null
  );
revoke all on "mzdy".org_verze from "public";

create  index "mzdy".ix_org_ver on "mzdy".org_verze (os_cislo, obdobi, operace);
create  index "mzdy".ix_org_ver2 on "mzdy".org_verze (os_cislo, cislo_pom, datum, cas);
{ TABLE "mzdy".org_utvar row size = 0 number of columns = 8 index size = 0 }
{ unload file name = org_utvar.unl number of rows = 0 }
create table "mzdy".org_utvar 
  (
    cislo char(10) not null,
    nazev char(100),
    zkratka char(15),
    kmen_str char(10),
    uroven integer,
    uj char(1),
    platnost_od date,
    platnost_do date
  );
revoke all on "mzdy".org_utvar from "public";

create unique  index "mzdy".ix_org_utv on "mzdy".org_utvar (uroven, cislo, platnost_od);
{ TABLE "mzdy".org_stru row size = 0 number of columns = 6 index size = 0 }
{ unload file name = org_stru.unl number of rows = 0 }
create table "mzdy".org_stru 
  (
    id integer not null,
    kod char(10),
    nazev char(25) not null,
    ostra integer,
    datum_od date,
    datum_do date
  );
revoke all on "mzdy".org_stru from "public";

create unique  index "mzdy".ix_org_stru on "mzdy".org_stru (kod, datum_od);
{ TABLE "mzdy".org_jedn_typy row size = 0 number of columns = 2 index size = 0 }
{ unload file name = org_jedn_typy.unl number of rows = 0 }
create table "mzdy".org_jedn_typy 
  (
    uroven integer,
    nazev char(60)
  );
revoke all on "mzdy".org_jedn_typy from "public";

{ TABLE "mzdy".org_jedn row size = 0 number of columns = 7 index size = 0 }
{ unload file name = org_jedn.unl number of rows = 0 }
create table "mzdy".org_jedn 
  (
    id integer not null,
    kod char(10),
    id_nadrizene integer,
    nazev char(60),
    id_orgstru integer not null,
    sys_typ integer,
    poradi integer
  );
revoke all on "mzdy".org_jedn from "public";

create  index "mzdy".i_oj_typ on "mzdy".org_jedn (sys_typ);
create  index "mzdy".i_oj_orgstru on "mzdy".org_jedn (id_orgstru);
create unique  index "mzdy".ix_org_jedn on "mzdy".org_jedn (kod, id_orgstru, sys_typ);
{ TABLE "mzdy".opravy row size = 0 number of columns = 14 index size = 0 }
{ unload file name = opravy.unl number of rows = 0 }
create table "mzdy".opravy 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    prac_str char(10),
    kod integer,
    c_dokladu integer,
    dat_od date,
    dat_do date,
    dny decimal(3,1),
    hodiny decimal(5,2),
    sazba decimal(16,2),
    castka decimal(16,2),
    prizn_aut char(2),
    obdobi date,
    datum date
  );
revoke all on "mzdy".opravy from "public";

create  index "mzdy".ix_opr_osc on "mzdy".opravy (os_cislo, datum);
create  index "mzdy".ix_opr_kod on "mzdy".opravy (kod, datum);
{ TABLE "mzdy".oj_atrib row size = 0 number of columns = 3 index size = 0 }
{ unload file name = oj_atrib.unl number of rows = 0 }
create table "mzdy".oj_atrib 
  (
    id_oj integer not null,
    id_atributu integer not null,
    hodnota char(25)
  );
revoke all on "mzdy".oj_atrib from "public";

create  index "mzdy".idx_orgatrib_oj on "mzdy".oj_atrib (id_oj);
create  index "mzdy".idx_orgatrib_atrib on "mzdy".oj_atrib (id_atributu);
{ TABLE "mzdy".odpocty_rod_prisl row size = 0 number of columns = 8 index size = 0 }
{ unload file name = odpocty_rod_prisl.unl number of rows = 11193 }
create table "mzdy".odpocty_rod_prisl 
  (
    id_rod_prisl integer not null,
    os_cislo decimal(10,0) not null,
    datum date not null,
    narok decimal(16,2) not null,
    sleva decimal(16,2) not null,
    bonus decimal(16,2) not null,
    poradi integer not null,
    ztpp char(1) not null
  );
revoke all on "mzdy".odpocty_rod_prisl from "public";

create  index "mzdy".ix_odp_rod_prisl on "mzdy".odpocty_rod_prisl (os_cislo, datum);
{ TABLE "mzdy".odpocty row size = 0 number of columns = 19 index size = 0 }
{ unload file name = odpocty.unl number of rows = 29842 }
create table "mzdy".odpocty 
  (
    os_cislo decimal(10,0) not null,
    osoba decimal(16,2),
    deti decimal(16,2),
    cast_inv decimal(16,2),
    plna_inv decimal(16,2),
    ztp_p decimal(16,2),
    student decimal(16,2),
    datum date not null,
    pod_prohl char(1),
    sum_deti decimal(16,2),
    bon_deti decimal(16,2),
    sum_osoba decimal(16,2),
    sum_cast_inv decimal(16,2),
    sum_plna_inv decimal(16,2),
    sum_ztp_p decimal(16,2),
    sum_student decimal(16,2),
    prum_vydelek decimal(16,2),
    trvani_zam integer,
    deti_po_novu char(1)
  );
revoke all on "mzdy".odpocty from "public";

create unique  index "mzdy".ix_odpocty on "mzdy".odpocty (os_cislo, datum);
{ TABLE "mzdy".odmeny_w_vypocet2 row size = 0 number of columns = 11 index size = 0 }
{ unload file name = odmeny_w_vypocet2.unl number of rows = 0 }
create table "mzdy".odmeny_w_vypocet2 
  (
    cis_kat integer,
    id_prvku integer,
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    kod integer,
    tarif decimal(16,2),
    premie decimal(16,2),
    plneni decimal(5,2),
    procento decimal(5,2),
    castka decimal(16,2),
    datum date
  );
revoke all on "mzdy".odmeny_w_vypocet2 from "public";

create  index "mzdy".ix_ow_iv21 on "mzdy".odmeny_w_vypocet2 (cis_kat, datum, os_cislo, cislo_pom);
{ TABLE "mzdy".odmeny_w_vypocet row size = 0 number of columns = 12 index size = 0 }
{ unload file name = odmeny_w_vypocet.unl number of rows = 0 }
create table "mzdy".odmeny_w_vypocet 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    prac_str char(10),
    cis_kat integer,
    kod integer,
    tarif decimal(16,2),
    premie decimal(16,2),
    procento decimal(5,2),
    proc_vedouci decimal(5,2),
    castka decimal(16,2),
    uprava_castky decimal(16,2),
    datum date
  );
revoke all on "mzdy".odmeny_w_vypocet from "public";

create  index "mzdy".ix_ow_iv1 on "mzdy".odmeny_w_vypocet (os_cislo, cislo_pom, datum);
create  index "mzdy".ix_ow_iv2 on "mzdy".odmeny_w_vypocet (prac_str, cis_kat, datum);
{ TABLE "mzdy".odmeny_w_prvky row size = 0 number of columns = 2 index size = 0 }
{ unload file name = odmeny_w_prvky.unl number of rows = 0 }
create table "mzdy".odmeny_w_prvky 
  (
    id integer not null,
    nazev char(50)
  );
revoke all on "mzdy".odmeny_w_prvky from "public";

create unique  index "mzdy".ix_ow_i1 on "mzdy".odmeny_w_prvky (id);
{ TABLE "mzdy".odmeny_w_plneni row size = 0 number of columns = 4 index size = 0 }
{ unload file name = odmeny_w_plneni.unl number of rows = 0 }
create table "mzdy".odmeny_w_plneni 
  (
    id integer not null,
    plneni decimal(5,2),
    uprava decimal(5,2),
    datum date
  );
revoke all on "mzdy".odmeny_w_plneni from "public";

create  index "mzdy".ix_ow_dat_id on "mzdy".odmeny_w_plneni (datum, id);
create unique  index "mzdy".ix_ow_id on "mzdy".odmeny_w_plneni (id);
{ TABLE "mzdy".odmeny_w_definice row size = 0 number of columns = 18 index size = 0 }
{ unload file name = odmeny_w_definice.unl number of rows = 0 }
create table "mzdy".odmeny_w_definice 
  (
    str char(10) not null,
    cis_kat integer not null,
    id_1 integer,
    id_2 integer,
    id_3 integer,
    id_4 integer,
    h_1 decimal(5,2),
    h_2 decimal(5,2),
    h_3 decimal(5,2),
    h_4 decimal(5,2),
    p_1 integer not null,
    p_2 integer not null,
    p_3 integer not null,
    p_4 integer not null,
    k_1 integer,
    k_2 integer,
    k_3 integer,
    k_4 integer
  );
revoke all on "mzdy".odmeny_w_definice from "public";

create unique  index "mzdy".ix_ow_str_kat on "mzdy".odmeny_w_definice (str, cis_kat);
{ TABLE "mzdy".odmeny_text row size = 0 number of columns = 13 index size = 0 }
{ unload file name = odmeny_text.unl number of rows = 301 }
create table "mzdy".odmeny_text 
  (
    c_dokladu integer not null,
    popis char(60),
    projekt char(24),
    sk_fin_pr char(5),
    hosp_cinn char(10),
    cislo_uctu char(20),
    cislo_uctu_sp char(20),
    cislo_uctu_zp char(20),
    cinnost_kod char(20),
    proj_kod char(20),
    polozka_kod char(20),
    polozka_kod_sp char(20),
    polozka_kod_zp char(20)
  );
revoke all on "mzdy".odmeny_text from "public";

{ TABLE "mzdy".odmeny row size = 0 number of columns = 28 index size = 0 }
{ unload file name = odmeny.unl number of rows = 169744 }
create table "mzdy".odmeny 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    prac_str char(10) not null,
    kod integer not null,
    c_dokladu integer not null,
    tarif decimal(16,2),
    odprac_hod decimal(7,2),
    prem_cast decimal(16,2),
    vyp_castka integer,
    castka decimal(16,2),
    vznik date,
    dat_do date,
    dny decimal(5,1),
    datum date not null,
    zakazka char(12),
    davka integer,
    soub_davka integer,
    vytvoril char(32),
    id_navrhu integer,
    id_vazby integer,
    typ_vazby char(2),
    id_vazby2 integer,
    typ_vazby2 char(2),
    castka_cizi decimal(16,2),
    mena_cizi char(3),
    kurz_cizi decimal(16,4),
    param1 decimal(7,2),
    param2 decimal(7,2)
  );
revoke all on "mzdy".odmeny from "public";

create  index "mzdy".ix_odm on "mzdy".odmeny (os_cislo, datum);
create  index "mzdy".ix_odm1 on "mzdy".odmeny (vyp_castka, datum);
{ TABLE "mzdy".ockovani row size = 0 number of columns = 8 index size = 0 }
{ unload file name = ockovani.unl number of rows = 0 }
create table "mzdy".ockovani 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    dr_ockov integer not null,
    datum date,
    platce integer,
    lekar integer,
    castka decimal(16,2),
    poznamka char(100)
  );
revoke all on "mzdy".ockovani from "public";

create  index "mzdy".ix_ockov1 on "mzdy".ockovani (os_cislo, datum);
create  index "mzdy".ix_ockov2 on "mzdy".ockovani (os_cislo);
create  index "mzdy".ix_ockov3 on "mzdy".ockovani (os_cislo, dr_ockov);
create  index "mzdy".ix_ockov4 on "mzdy".ockovani (datum);
{ TABLE "mzdy".ockov_stat row size = 0 number of columns = 6 index size = 0 }
{ unload file name = ockov_stat.unl number of rows = 0 }
create table "mzdy".ockov_stat 
  (
    id integer not null,
    st_prisl char(7) not null,
    ockov integer not null,
    povinne char(1),
    plati_od date,
    plati_do date
  );
revoke all on "mzdy".ockov_stat from "public";

create  index "mzdy".ix_ock_stat1 on "mzdy".ockov_stat (st_prisl);
create  index "mzdy".ix_ock_stat2 on "mzdy".ockov_stat (st_prisl, ockov);
create  index "mzdy".ix_ock_stat3 on "mzdy".ockov_stat (ockov);
{ TABLE "mzdy".obrazky row size = 0 number of columns = 5 index size = 0 }
{ unload file name = obrazky.unl number of rows = 0 }
create table "mzdy".obrazky 
  (
    os_cislo char(12) not null,
    cislo_pom integer not null,
    typ_obrazku char(32) not null,
    format_obrazku char(4) not null,
    data_obrazku byte
  );
revoke all on "mzdy".obrazky from "public";

create unique  index "mzdy".idx_obrazky on "mzdy".obrazky (os_cislo, cislo_pom, typ_obrazku);
{ TABLE "mzdy".obory_funk row size = 0 number of columns = 2 index size = 0 }
{ unload file name = obory_funk.unl number of rows = 0 }
create table "mzdy".obory_funk 
  (
    funkce char(8),
    cis_skup integer not null
  );
revoke all on "mzdy".obory_funk from "public";

create  index "mzdy".idx_obory_funk on "mzdy".obory_funk (funkce, cis_skup);
{ TABLE "mzdy".nap_predch_zam row size = 0 number of columns = 13 index size = 0 }
{ unload file name = nap_predch_zam.unl number of rows = 127 }
create table "mzdy".nap_predch_zam 
  (
    rok integer not null,
    os_cislo decimal(10,0) not null,
    id_zazn integer not null,
    firma char(50),
    prijmy decimal(16,2),
    prijmy_doh decimal(16,2),
    pojist decimal(16,2),
    pojist_sp decimal(16,2),
    pojist_zp decimal(16,2),
    dan decimal(16,2),
    bonus decimal(16,2),
    bonus2 decimal(16,2),
    cinnost1pol char(1)
  );
revoke all on "mzdy".nap_predch_zam from "public";

create unique  index "mzdy".ix_nap_pr_zam on "mzdy".nap_predch_zam (rok, os_cislo, id_zazn);
{ TABLE "mzdy".mzd_stat_uz row size = 0 number of columns = 16 index size = 0 }
{ unload file name = mzd_stat_uz.unl number of rows = 162 }
create table "mzdy".mzd_stat_uz 
  (
    varianta integer not null,
    poradi integer not null,
    por_cis_pol char(3),
    nazev_pol char(30),
    kody_vycet char(100),
    castka_dny_hod char(1) not null,
    skup_a integer not null,
    skup_b integer not null,
    skup_c integer not null,
    skup_d integer not null,
    skup_e integer not null,
    skup_f integer not null,
    skup_g integer not null,
    skup_h integer not null,
    skup_i integer not null,
    titulek char(120)
  );
revoke all on "mzdy".mzd_stat_uz from "public";

{ TABLE "mzdy".mzd_prostr_ur_par row size = 0 number of columns = 3 index size = 0 }
{ unload file name = mzd_prostr_ur_par.unl number of rows = 0 }
create table "mzdy".mzd_prostr_ur_par 
  (
    typ integer not null,
    poradi integer not null,
    kody char(250) not null
  );
revoke all on "mzdy".mzd_prostr_ur_par from "public";

{ TABLE "mzdy".nastaveni_ucto row size = 0 number of columns = 5 index size = 0 }
{ unload file name = nastaveni_ucto.unl number of rows = 0 }
create table "mzdy".nastaveni_ucto 
  (
    typ char(1) not null,
    pol1 char(20) not null,
    pol2 char(100),
    pol3 char(100),
    pol4 char(100)
  );
revoke all on "mzdy".nastaveni_ucto from "public";

{ TABLE "mzdy".mzd_prostr_ur_hd row size = 0 number of columns = 9 index size = 0 }
{ unload file name = mzd_prostr_ur_hd.unl number of rows = 0 }
create table "mzdy".mzd_prostr_ur_hd 
  (
    typ integer not null,
    rok integer not null,
    id integer not null,
    poradi integer not null,
    str char(250),
    skup_str char(250),
    celk_prostr decimal(10,0),
    obdobi integer,
    proc_soc_pr decimal(5,2)
  );
revoke all on "mzdy".mzd_prostr_ur_hd from "public";

{ TABLE "mzdy".obory row size = 0 number of columns = 3 index size = 0 }
{ unload file name = obory.unl number of rows = 397 }
create table "mzdy".obory 
  (
    obor char(8) not null,
    vyznam char(70),
    skupina integer
  );
revoke all on "mzdy".obory from "public";

create unique  index "mzdy".idx_obory on "mzdy".obory (obor);
{ TABLE "mzdy".mzd_prostr_head row size = 0 number of columns = 10 index size = 0 }
{ unload file name = mzd_prostr_head.unl number of rows = 0 }
create table "mzdy".mzd_prostr_head 
  (
    rok integer not null,
    id_vykazu integer not null,
    por_vykazu integer not null,
    par1 decimal(12,2),
    par2 decimal(12,2),
    par3 decimal(12,2),
    par4 decimal(12,2),
    par5 decimal(12,2),
    posl_vyh_mes integer not null,
    typ_planu char(1)
  );
revoke all on "mzdy".mzd_prostr_head from "public";

{ TABLE "mzdy".mzd_prostr_det row size = 0 number of columns = 44 index size = 0 }
{ unload file name = mzd_prostr_det.unl number of rows = 0 }
create table "mzdy".mzd_prostr_det 
  (
    rok integer not null,
    id_vykazu integer not null,
    por_vykazu integer not null,
    por_radku integer not null,
    id_radku integer,
    typ_radku char(1),
    proc1 decimal(7,4),
    plan1 decimal(16,4),
    skut1 decimal(16,4),
    proc2 decimal(7,4),
    plan2 decimal(16,4),
    skut2 decimal(16,4),
    proc3 decimal(7,4),
    plan3 decimal(16,4),
    skut3 decimal(16,4),
    proc4 decimal(7,4),
    plan4 decimal(16,4),
    skut4 decimal(16,4),
    proc5 decimal(7,4),
    plan5 decimal(16,4),
    skut5 decimal(16,4),
    proc6 decimal(7,4),
    plan6 decimal(16,4),
    skut6 decimal(16,4),
    proc7 decimal(7,4),
    plan7 decimal(16,4),
    skut7 decimal(16,4),
    proc8 decimal(7,4),
    plan8 decimal(16,4),
    skut8 decimal(16,4),
    proc9 decimal(7,4),
    plan9 decimal(16,4),
    skut9 decimal(16,4),
    proc10 decimal(7,4),
    plan10 decimal(16,4),
    skut10 decimal(16,4),
    proc11 decimal(7,4),
    plan11 decimal(16,4),
    skut11 decimal(16,4),
    proc12 decimal(7,4),
    plan12 decimal(16,4),
    skut12 decimal(16,4),
    plan_c decimal(16,4),
    skut_c decimal(16,4)
  );
revoke all on "mzdy".mzd_prostr_det from "public";

{ TABLE "mzdy".modul_zaz row size = 0 number of columns = 12 index size = 0 }
{ unload file name = modul_zaz.unl number of rows = 0 }
create table "mzdy".modul_zaz 
  (
    id integer,
    rok integer,
    mesic integer,
    id_modul char(1),
    id_skup integer,
    procento decimal(5,2),
    zm_zam decimal(5,2),
    zm_proc decimal(5,2),
    rozpocet decimal(16,2),
    pev_prum decimal(12,2),
    prirustek_zam decimal(5,2),
    prirustek_proc decimal(5,2)
  );
revoke all on "mzdy".modul_zaz from "public";

create  index "mzdy".ix_modul_zaz on "mzdy".modul_zaz (id, rok, mesic, id_modul, id_skup);
{ TABLE "mzdy".modul_skup row size = 0 number of columns = 3 index size = 0 }
{ unload file name = modul_skup.unl number of rows = 0 }
create table "mzdy".modul_skup 
  (
    id integer,
    id_skup integer,
    nazev char(30)
  );
revoke all on "mzdy".modul_skup from "public";

create  index "mzdy".ix_mod_skup on "mzdy".modul_skup (id_skup, id);
{ TABLE "mzdy".model_seznam row size = 0 number of columns = 3 index size = 0 }
{ unload file name = model_seznam.unl number of rows = 0 }
create table "mzdy".model_seznam 
  (
    id integer not null,
    typ char(2),
    popis char(250)
  );
revoke all on "mzdy".model_seznam from "public";

{ TABLE "mzdy".model_prirazeni row size = 0 number of columns = 2 index size = 0 }
{ unload file name = model_prirazeni.unl number of rows = 0 }
create table "mzdy".model_prirazeni 
  (
    idm integer not null,
    idp integer not null
  );
revoke all on "mzdy".model_prirazeni from "public";

{ TABLE "mzdy".model_polozky row size = 0 number of columns = 3 index size = 0 }
{ unload file name = model_polozky.unl number of rows = 0 }
create table "mzdy".model_polozky 
  (
    id integer not null,
    typ char(2),
    popis char(250)
  );
revoke all on "mzdy".model_polozky from "public";

{ TABLE "mzdy".monitor_vykonu row size = 0 number of columns = 10 index size = 0 }
{ unload file name = monitor_vykonu.unl number of rows = 0 }
create table "mzdy".monitor_vykonu 
  (
    session_id integer not null,
    typ char(3) not null,
    millisec integer not null,
    sqlcmd char(800) not null,
    sqlerr char(600),
    zacatek char(12) not null,
    konec char(12) not null,
    vlakno integer not null,
    poradi_vlakno integer not null,
    poradi_session integer not null
  );
revoke all on "mzdy".monitor_vykonu from "public";

{ TABLE "mzdy".miniap row size = 0 number of columns = 4 index size = 0 }
{ unload file name = miniap.unl number of rows = 0 }
create table "mzdy".miniap 
  (
    miniap char(42) not null,
    uzivatel char(64),
    polozka char(24) not null,
    hodnota char(64)
  );
revoke all on "mzdy".miniap from "public";

{ TABLE "mzdy".mincovka row size = 0 number of columns = 1 index size = 0 }
{ unload file name = mincovka.unl number of rows = 0 }
create table "mzdy".mincovka 
  (
    castka decimal(16,2) not null
  );
revoke all on "mzdy".mincovka from "public";

{ TABLE "mzdy".mesice row size = 0 number of columns = 18 index size = 0 }
{ unload file name = mesice.unl number of rows = 252 }
create table "mzdy".mesice 
  (
    rok integer,
    mesic integer,
    dny_celkem integer,
    dny_prac integer,
    svatky integer,
    dny1 integer,
    dny2 integer,
    dny3 integer,
    dny4 integer,
    hdny1 integer,
    hdny2 integer,
    hdny3 integer,
    hdny4 integer,
    zalohy integer,
    vyplaty integer,
    kopie integer,
    id_podniku integer not null,
    z_kopie integer
  );
revoke all on "mzdy".mesice from "public";

create  index "mzdy".ix_mes_idp on "mzdy".mesice (id_podniku);
{ TABLE "mzdy".mesbuf row size = 0 number of columns = 18 index size = 0 }
{ unload file name = mesbuf.unl number of rows = 2371 }
create table "mzdy".mesbuf 
  (
    id integer not null,
    druh char(1) not null,
    nadpis char(50),
    text char(250),
    moznosti char(25),
    odpoved integer,
    datum date not null,
    cas char(8),
    v_obdobi date,
    verze char(11),
    uzivatel char(64),
    stanice char(50),
    zdroj char(80),
    os_cislo decimal(10,0),
    otisk char(32),
    zobrazeno_kdy char(19),
    id_uzivprofil integer,
    session_id integer
  );
revoke all on "mzdy".mesbuf from "public";

create  index "mzdy".ix_mesbuf on "mzdy".mesbuf (datum, cas, druh, nadpis);
create  index "mzdy".ix_mesbuf_2 on "mzdy".mesbuf (id);
create  index "mzdy".ix_mesbuf_3 on "mzdy".mesbuf (v_obdobi, druh, nadpis);
create  index "mzdy".ix_mesbuf_4 on "mzdy".mesbuf (druh, verze, nadpis);
{ TABLE "mzdy".mes_fondy_dny row size = 0 number of columns = 8 index size = 0 }
{ unload file name = mes_fondy_dny.unl number of rows = 0 }
create table "mzdy".mes_fondy_dny 
  (
    cis_roz integer not null,
    rok integer not null,
    mesic integer not null,
    den integer not null,
    smena char(1),
    pocet_hodin decimal(5,2),
    zac_sm char(4),
    datum date not null
  );
revoke all on "mzdy".mes_fondy_dny from "public";

create  index "mzdy".ix_mdatum on "mzdy".mes_fondy_dny (cis_roz, datum);
{ TABLE "mzdy".mes_fondy row size = 0 number of columns = 9 index size = 0 }
{ unload file name = mes_fondy.unl number of rows = 0 }
create table "mzdy".mes_fondy 
  (
    cis_roz integer not null,
    naz_roz char(20),
    rok integer not null,
    mesic integer not null,
    dny integer,
    hodiny decimal(5,2),
    potlac_gen_svat integer,
    prepoc_na_uvaz integer,
    datum date not null
  );
revoke all on "mzdy".mes_fondy from "public";

create  index "mzdy".ix_mfondy on "mzdy".mes_fondy (cis_roz);
{ TABLE "mzdy".mena_param row size = 0 number of columns = 3 index size = 0 }
{ unload file name = mena_param.unl number of rows = 0 }
create table "mzdy".mena_param 
  (
    id_podniku integer,
    kod_meny char(3) not null,
    anal_ucet char(7)
  );
revoke all on "mzdy".mena_param from "public";

{ TABLE "mzdy".m_stred row size = 0 number of columns = 21 index size = 0 }
{ unload file name = m_stred.unl number of rows = 9 }
create table "mzdy".m_stred 
  (
    str char(10) not null,
    nazev char(80) not null,
    nazev2 char(80),
    cis_divize integer,
    skup_str integer,
    celk_castka decimal(16,2),
    cerp_castka decimal(16,2),
    plan_brut decimal(16,2),
    brutto decimal(16,2),
    pobocka integer,
    priznaky char(10),
    typ char(1),
    plati_od date,
    plati_do date,
    cena_nizsi decimal(16,2),
    cena_vyssi decimal(16,2),
    id_str integer,
    id_podniku integer not null,
    id_projektu integer,
    id_zakazky integer,
    generovat_rezii integer
  );
revoke all on "mzdy".m_stred from "public";

create unique  index "mzdy".m_ix_str_idpstr10 on "mzdy".m_stred (id_podniku, str);
create  index "mzdy".m_ix_stred_110 on "mzdy".m_stred (skup_str, id_podniku);
{ TABLE "mzdy".m_pracovnici row size = 0 number of columns = 159 index size = 0 }
{ unload file name = m_pracovnici.unl number of rows = 753 }
create table "mzdy".m_pracovnici 
  (
    os_cislo decimal(10,0),
    prijmeni char(40),
    jmeno char(40),
    titul char(25),
    rodne_jmeno char(40),
    rodne_cislo char(10),
    misto_narozeni char(48),
    rodin_stav char(1),
    narodnost char(2),
    st_prisl char(3),
    cislo_op char(12),
    cislo_pasu char(12),
    bran_pov char(2),
    ulice_trv char(45),
    tr_ulice char(30),
    tr_cislo char(14),
    misto_trv char(48),
    psc_trv char(5),
    posta_trv char(48),
    ulice_prech char(45),
    pr_ulice char(30),
    pr_cislo char(14),
    misto_prech char(48),
    psc_prech char(5),
    posta_prech char(48),
    kmen_str char(10),
    vypl_str integer,
    zaloha decimal(16,2),
    prech_zal integer,
    druh_slevy integer,
    zmen_prac_sch char(2),
    vyziv_os_nvc integer,
    vyziv_os_exm integer,
    druh_duchodu char(3),
    duchod_od date,
    clen_roh char(1),
    vybor_oh integer,
    datum_nastupu date,
    datum_vystupu date,
    datum_zmeny date,
    uhrn_mezd_letos decimal(16,2),
    uhrn_dohod decimal(16,2),
    kal_dny_dohod integer not null,
    uhrn_pojist decimal(16,2),
    dan_sleva char(1),
    sleva_od date,
    student char(1) not null,
    uhrn_dan_zakl decimal(16,2),
    uhrn_dani decimal(16,2),
    dan_zakl_cizi decimal(16,2) not null,
    dan_cizi decimal(16,2) not null,
    uhrn_nem decimal(16,2) not null,
    zakl_sraz_dan decimal(16,2) not null,
    srazk_dan decimal(16,2) not null,
    m_dan_zakl_cizi decimal(16,2) not null,
    m_dan_cizi decimal(16,2) not null,
    m_uhrn_nem decimal(16,2) not null,
    m_zakl_sraz_dan decimal(16,2) not null,
    m_srazk_dan decimal(16,2) not null,
    rocni_zuct char(1),
    m_dan_zakl decimal(16,2),
    m_dan decimal(16,2),
    rocni_odpoc decimal(16,2),
    odpoc_duch integer,
    odpoc_manz decimal(16,2),
    odpoc_dary decimal(16,2),
    dan_roc_zakl decimal(16,2),
    zust_minci decimal(16,2),
    dluh decimal(16,2),
    kal_dny integer,
    nahr_dny integer,
    kcs_duchod decimal(16,2),
    vek_duchod integer,
    mes_duchod decimal(3,1),
    odpr_roky_dov integer,
    odpr_dny_dov integer,
    zam_roky integer,
    zam_dny integer,
    zdrav_poj integer,
    zdrav_poj_od date,
    min_zdrav_poj integer,
    cis_poj_cizi char(10),
    deti_pro_duch integer,
    uhrn_dan_z_c decimal(16,2),
    uhrn_pojist_c decimal(16,2),
    eldp_adr char(1),
    eldp_zahr char(1),
    eldp_kod_st integer,
    nepoc_soc integer,
    kontr_podp_doby integer,
    prihl_jm char(128),
    model_pd char(10),
    titul_za char(25),
    sleva_do date,
    zps_od date,
    zps_do date,
    dan_nerez char(1),
    stravenky char(1),
    bez_dane char(1),
    datum_1_nast date,
    duchod_do date,
    op_plat date,
    pas_plat date,
    dat_duch_predp date,
    souhlas_cud char(1),
    souhlas_cud_mzd char(1),
    uhrn_dsleva decimal(16,2),
    uhrn_dbonus decimal(16,2),
    m_dsleva decimal(16,2),
    m_dbonus decimal(16,2),
    dsleva_cizi decimal(16,2),
    dbonus_cizi decimal(16,2),
    id_agentury integer,
    id_firmy integer,
    uhrn_superhr decimal(16,2),
    uhrn_sp_firma decimal(16,2),
    uhrn_zp_firma decimal(16,2),
    soc_uhrn_vz decimal(16,2),
    zdrav_uhrn_vz decimal(16,2),
    soc_uhrn_vz_x decimal(16,2),
    zdrav_uhrn_vz_x decimal(16,2),
    druhy_pilier_sk char(1),
    zac_nem_poj date,
    duch_poj_ciz char(1),
    prech_stat_adr char(2),
    trv_postcode char(11),
    prech_postcode char(11),
    cssz_ecp char(10),
    doch_karta char(15),
    okres_nar char(20),
    stat_nar char(2),
    stat_adr char(2),
    id_podniku integer not null,
    e101 char(1),
    znc_max decimal(16,2),
    uhrn_soc_poj decimal(16,2),
    uhrn_zdrav_poj decimal(16,2),
    cislo_duch_spor char(10),
    smluv_netto decimal(16,2),
    smluv_netto_cizi decimal(16,2),
    uhrn_dohod_cizi decimal(16,2),
    uhrn_sp_cizi decimal(16,2),
    uhrn_zp_cizi decimal(16,2),
    evid_cislo char(32),
    odpoc_zp char(1),
    dcis_nerezidenta char(20),
    typdcis_nerezid char(1),
    statdcis_nerezid char(2),
    cdokl_nerezid char(15),
    typdokl_nerezid char(1),
    statdokl_nerezid char(2),
    dat_ukonczam_cr date,
    doktorand char(1),
    prijmy_doh decimal(16,2),
    vydavatel_pasu char(40),
    dat_zacatkuzam_cr date,
    sleva_sp_fir_stav char(1),
    sleva_sp_fir_druh char(1),
    sleva_sp_duch char(1)
  );
revoke all on "mzdy".m_pracovnici from "public";

create unique  index "mzdy".m_ix_prac10 on "mzdy".m_pracovnici (os_cislo);
create  index "mzdy".m_ix_pri10 on "mzdy".m_pracovnici (prijmeni, jmeno);
create unique  index "mzdy".m_ix_prac_str10 on "mzdy".m_pracovnici (kmen_str, os_cislo);
create unique  index "mzdy".m_ix_prac_idposc10 on "mzdy".m_pracovnici (id_podniku, os_cislo, datum_vystupu);
create  index "mzdy".m_ix_pracovn_rc10 on "mzdy".m_pracovnici (rodne_cislo);
create  index "mzdy".m_ix_pra_stra10 on "mzdy".m_pracovnici (stravenky);
create  index "mzdy".m_ix_prac_110 on "mzdy".m_pracovnici (id_podniku, os_cislo, prijmeni, jmeno, titul, rodne_jmeno);
create  index "mzdy".m_ix_prac_210 on "mzdy".m_pracovnici (min_zdrav_poj, id_podniku, os_cislo);
{ TABLE "mzdy".m_prac_pom row size = 0 number of columns = 136 index size = 0 }
{ unload file name = m_prac_pom.unl number of rows = 1181 }
create table "mzdy".m_prac_pom 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    druh_pom char(1) not null,
    doba_uvazku char(1) not null,
    prac_str char(10) not null,
    skup_prac char(7),
    prac_kateg integer,
    jkz integer,
    pov_funkce char(12),
    mzd_stup integer,
    trida integer,
    typ_tt integer not null,
    zak_uvazek decimal(4,2) not null,
    hod_uvazek decimal(4,2) not null,
    smena integer,
    duvod_kratsi char(1),
    typ_kal integer not null,
    rozp_kateg char(3),
    vykaz char(3),
    rez_zakazka char(10),
    typ_mzdy integer not null,
    tarif decimal(16,2) not null,
    os_hodn decimal(16,2),
    tarif_cizi decimal(16,4),
    kurz_cizi decimal(16,4),
    pripl_vedeni decimal(16,2),
    pripl_zvlastni decimal(16,2),
    typ_premii integer,
    prem_cast decimal(16,2),
    odpr_pro_dov integer not null,
    neodpr_dny integer not null,
    ex_dov char(1),
    navaz_dov char(1),
    dov_narok decimal(3,1) not null,
    dov_cerpana decimal(5,2) not null,
    dov_kracena decimal(5,2) not null,
    dov_predmin decimal(5,2),
    zbyv_rd_min_rok decimal(5,2) not null,
    rd_letos decimal(5,2) not null,
    dov_dodatk_r decimal(5,2),
    dov_dodatk decimal(5,2),
    trv_dov char(1) not null,
    trv_nem char(1) not null,
    dny_ro_dov decimal(5,1) not null,
    hod_ro_dov decimal(7,2) not null,
    kcs_dov decimal(16,2) not null,
    kcs_dov_1 decimal(16,2) not null,
    kcs_dov_2 decimal(16,2) not null,
    kcs_dov_3 decimal(16,2) not null,
    kcs_dov_4 decimal(16,2) not null,
    prum_dov decimal(16,2),
    min_prum_dov decimal(16,2),
    dny_ro_nem decimal(6,1) not null,
    kcs_nem decimal(16,2) not null,
    prum_nem decimal(16,2),
    min_prum_nem decimal(16,2),
    dny_nemoci integer not null,
    praxe integer,
    praxe_dny integer,
    min_zakl decimal(16,2),
    min_pripl decimal(16,2),
    min_uvazek decimal(4,2),
    min_min_mzda decimal(16,2),
    potl_min_mzdy char(1),
    datum_nastupu date not null,
    duvod_nast char(3),
    datum_zmeny date,
    datum_ukonc date,
    duvod_ukonc char(3),
    zac_nem_poj date,
    eldp_1znak char(1),
    eldp_3znak char(1),
    eldp_akt char(1),
    eldp_nezahrn char(1),
    druh_pom_j char(2),
    zk_doba date,
    kl_po_zam char(4),
    zap_praxe char(8),
    zap_praxe_od date,
    zvys_ps_mes integer,
    zvys_ps_rok integer,
    zvys_ps_dat date,
    id_pracmist integer,
    id_pracmist_2 integer,
    datum_pr_sml date,
    datum_plan_odch date,
    datum_skut_nast date,
    premie_proc_ind decimal(5,2),
    dov_generovat char(1),
    dov_kratit char(1),
    doplnkova_1 char(50),
    doplnkova_2 date,
    cislo_platvym integer,
    cislo_dodatsml integer,
    nahr_hod_uvazek decimal(4,2),
    nahr_typ_kal integer,
    nahr_smena integer,
    jen_duchpoj char(1),
    maly_rozsah char(1),
    dat_doruc_vypov date,
    ucast_duchp_od date,
    misto_vykonu char(50),
    kpd_od date,
    kpd_do date,
    kpd_prum decimal(16,4),
    prum_rok decimal(16,4),
    vychozi_pomer integer,
    c_kmen_pom integer,
    isco08 char(7),
    ind_dn_sk char(1),
    zpusob_ukonc char(7),
    model_pd char(10),
    doch_karta char(15),
    mespr_vypl_nepr char(1),
    id_rez_projekt integer,
    tyd_prac_doba char(1),
    smluv_pom_uv decimal(6,4),
    mes_pom_uv decimal(6,4),
    prum_pom_uv decimal(6,4),
    cislo_sluz_oznac char(3),
    mesice_pracurad integer,
    eldp_vyd_cin_od date,
    legislat_uvazek decimal(4,2),
    id_agentury integer,
    vynimka char(1),
    zpracov_mzdy char(7),
    zpracov_pers char(7),
    mena_cizi char(3),
    ic_prav_vztahu char(15),
    doplnkova_3 char(10),
    odvod_odp_pol_od date,
    odvod_odp_pol_do date,
    naroc_prof_produch char(1),
    garance_castka decimal(16,2),
    homeof_typ_kal integer,
    homeof_smena integer
  );
revoke all on "mzdy".m_prac_pom from "public";

create  index "mzdy".m_ix_pom10 on "mzdy".m_prac_pom (os_cislo);
create unique  index "mzdy".m_ix_pom210 on "mzdy".m_prac_pom (os_cislo, cislo_pom);
create  index "mzdy".m_ix_pom310 on "mzdy".m_prac_pom (os_cislo, datum_nastupu, datum_ukonc);
create  index "mzdy".m_ix_pom410 on "mzdy".m_prac_pom (datum_nastupu);
create  index "mzdy".m_ix_pom510 on "mzdy".m_prac_pom (datum_ukonc);
{ TABLE "mzdy".logarch_prop row size = 0 number of columns = 3 index size = 0 }
{ unload file name = logarch_prop.unl number of rows = 6717 }
create table "mzdy".logarch_prop 
  (
    session_id integer not null,
    polozka char(20) not null,
    hodnota char(255)
  );
revoke all on "mzdy".logarch_prop from "public";

{ TABLE "mzdy".lekari row size = 0 number of columns = 2 index size = 0 }
{ unload file name = lekari.unl number of rows = 0 }
create table "mzdy".lekari 
  (
    cislo integer,
    nazev char(30)
  );
revoke all on "mzdy".lekari from "public";

{ TABLE "mzdy".lektori row size = 0 number of columns = 19 index size = 0 }
{ unload file name = lektori.unl number of rows = 11 }
create table "mzdy".lektori 
  (
    cislo_lek integer not null,
    lektor char(50),
    obch_jmeno char(30),
    ico char(10),
    dico char(14),
    hodnoceni char(1),
    ulice_trv char(30),
    misto_trv char(48),
    psc_trv char(5),
    tel1 char(15),
    tel2 char(15),
    fax char(15),
    email char(50),
    kontakt1 char(50),
    kontakt2 char(50),
    cleneni char(20),
    nepouzivany char(1),
    id_edumenu integer,
    poznamka char(80)
  );
revoke all on "mzdy".lektori from "public";

create unique  index "mzdy".idx_lektori on "mzdy".lektori (cislo_lek);
{ TABLE "mzdy".limity row size = 0 number of columns = 21 index size = 0 }
{ unload file name = limity.unl number of rows = 0 }
create table "mzdy".limity 
  (
    id integer not null,
    systyp integer,
    nazev char(30) not null,
    plati_od date not null,
    plati_do date,
    id_podniku integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    druh_pom char(25),
    prac_kat char(25),
    min_dny decimal(25,1),
    min_hod decimal(25,2),
    min_castka decimal(16,2),
    max_dny decimal(25,1),
    max_hod decimal(25,2),
    max_castka decimal(16,2),
    mzd_pol char(255) not null,
    limit_na char(1) not null,
    limit_obd integer not null,
    min_saz decimal(25,4),
    max_saz decimal(25,4)
  );
revoke all on "mzdy".limity from "public";

{ TABLE "mzdy".logarch row size = 0 number of columns = 11 index size = 0 }
{ unload file name = logarch.unl number of rows = 712 }
create table "mzdy".logarch 
  (
    session_id integer not null,
    app_type char(2) not null,
    app_processid integer,
    dat_prihlaseni char(19) not null,
    dat_odhlaseni char(19),
    obdobi date,
    verze char(11),
    uzivatel char(64),
    stanice char(128),
    id_uzivprofil integer,
    otisk char(32)
  );
revoke all on "mzdy".logarch from "public";

create  index "mzdy".ix_logarch_1 on "mzdy".logarch (dat_prihlaseni);
create  index "mzdy".ix_logarch_2 on "mzdy".logarch (uzivatel);
create  index "mzdy".ix_logarch_3 on "mzdy".logarch (stanice, app_processid);
{ TABLE "mzdy".lek_operace row size = 0 number of columns = 4 index size = 0 }
{ unload file name = lek_operace.unl number of rows = 0 }
create table "mzdy".lek_operace 
  (
    id integer not null,
    stred char(10) not null,
    operace char(10) not null,
    prohl integer not null
  );
revoke all on "mzdy".lek_operace from "public";

create  index "mzdy".ix_lek_oper on "mzdy".lek_operace (stred, operace);
{ TABLE "mzdy".lekar row size = 0 number of columns = 9 index size = 0 }
{ unload file name = lekar.unl number of rows = 4 }
create table "mzdy".lekar 
  (
    cislo integer not null,
    nazev char(30) not null,
    ulice char(30),
    misto char(48),
    psc char(5),
    dat_od date,
    dat_do date,
    telefon char(50),
    email char(50)
  );
revoke all on "mzdy".lekar from "public";

{ TABLE "mzdy".lekar_prdoba row size = 0 number of columns = 10 index size = 0 }
{ unload file name = lekar_prdoba.unl number of rows = 0 }
create table "mzdy".lekar_prdoba 
  (
    id integer not null,
    lekar integer not null,
    den integer not null,
    cas_od char(8) not null,
    cas_do char(8) not null,
    pauza_od char(8) not null,
    pauza_do char(8) not null,
    misto char(64) not null,
    interval integer not null,
    kapacita integer not null
  );
revoke all on "mzdy".lekar_prdoba from "public";

create unique  index "mzdy".ix_lek_prdoba1 on "mzdy".lekar_prdoba (lekar, den, misto);
{ TABLE "mzdy".lekar_prihlaseni row size = 0 number of columns = 7 index size = 0 }
{ unload file name = lekar_prihlaseni.unl number of rows = 0 }
create table "mzdy".lekar_prihlaseni 
  (
    id integer not null,
    id_terminu integer not null,
    os_cislo decimal(10,0) not null,
    prihlasil decimal(10,0) not null,
    typ char(1) not null,
    poznamka char(250),
    datum date not null
  );
revoke all on "mzdy".lekar_prihlaseni from "public";

create unique  index "mzdy".ix_lek_prihl1 on "mzdy".lekar_prihlaseni (id_terminu, os_cislo, datum, id);
{ TABLE "mzdy".lekar_terminy row size = 0 number of columns = 10 index size = 0 }
{ unload file name = lekar_terminy.unl number of rows = 0 }
create table "mzdy".lekar_terminy 
  (
    id integer not null,
    lekar integer not null,
    termin date,
    cas_od char(8) not null,
    cas_do char(8) not null,
    misto char(128) not null,
    kapacita integer not null,
    stav char(8) not null,
    poznamka char(250),
    datum date not null
  );
revoke all on "mzdy".lekar_terminy from "public";

create unique  index "mzdy".ix_lek_term1 on "mzdy".lekar_terminy (lekar, misto, termin, cas_od);
{ TABLE "mzdy".lekar_uni row size = 0 number of columns = 3 index size = 0 }
{ unload file name = lekar_uni.unl number of rows = 0 }
create table "mzdy".lekar_uni 
  (
    id integer not null,
    typ integer not null,
    hodnota char(250) not null
  );
revoke all on "mzdy".lekar_uni from "public";

{ TABLE "mzdy".kstabcache row size = 0 number of columns = 3 index size = 0 }
{ unload file name = kstabcache.unl number of rows = 0 }
create table "mzdy".kstabcache 
  (
    tabname char(18) not null,
    tabage integer not null,
    tabtype char(1) not null
  );
revoke all on "mzdy".kstabcache from "public";

create  index "mzdy".ix_kstabcache on "mzdy".kstabcache (tabname);
{ TABLE "mzdy".kpi_vzdel_akce row size = 0 number of columns = 8 index size = 0 }
{ unload file name = kpi_vzdel_akce.unl number of rows = 0 }
create table "mzdy".kpi_vzdel_akce 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    cis_osve char(10) not null,
    splneno char(1) not null,
    doporuceni char(100),
    skoleni char(100),
    datum date not null
  );
revoke all on "mzdy".kpi_vzdel_akce from "public";

create  index "mzdy".x_kpi_vzdel_p1 on "mzdy".kpi_vzdel_akce (os_cislo, cislo_pom);
create  index "mzdy".x_kpi_vzdel_p2 on "mzdy".kpi_vzdel_akce (os_cislo, cislo_pom, datum);
{ TABLE "mzdy".kpi_vysl row size = 0 number of columns = 18 index size = 0 }
{ unload file name = kpi_vysl.unl number of rows = 0 }
create table "mzdy".kpi_vysl 
  (
    id integer not null,
    org_jed char(5),
    os_cislo decimal(10,0),
    cislo_pom integer,
    typ_hodn char(1) not null,
    krit integer not null,
    vaha integer,
    skup_id integer,
    skup_hodn char(150),
    nact_hodn char(150),
    meritko char(50),
    vlast_hodn decimal(10,2),
    vyp_hodn decimal(10,2),
    opr_hodn decimal(10,2),
    proc_odmeny decimal(5,2),
    uziv char(64),
    obdobi date not null,
    idp integer
  );
revoke all on "mzdy".kpi_vysl from "public";

create  index "mzdy".ix_kpi_vysl1 on "mzdy".kpi_vysl (org_jed, typ_hodn);
create  index "mzdy".ix_kpi_vysl2 on "mzdy".kpi_vysl (org_jed, typ_hodn, obdobi);
create  index "mzdy".ix_kpi_vysl3 on "mzdy".kpi_vysl (os_cislo, typ_hodn);
create  index "mzdy".ix_kpi_vysl4 on "mzdy".kpi_vysl (os_cislo, typ_hodn, obdobi);
{ TABLE "mzdy".kpi_text_hodn row size = 0 number of columns = 3 index size = 0 }
{ unload file name = kpi_text_hodn.unl number of rows = 0 }
create table "mzdy".kpi_text_hodn 
  (
    hodn_od decimal(5,2) not null,
    hodn_do decimal(5,2) not null,
    text_hodn char(60) not null
  );
revoke all on "mzdy".kpi_text_hodn from "public";

{ TABLE "mzdy".kpi_telegr row size = 0 number of columns = 31 index size = 0 }
{ unload file name = kpi_telegr.unl number of rows = 0 }
create table "mzdy".kpi_telegr 
  (
    id integer not null,
    typ_hodn char(1) not null,
    akce integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    id_pracmista integer,
    datum date,
    vyhod decimal(10,0),
    schvalil decimal(10,0),
    obeznamen char(1) not null,
    dat_obezn date,
    souhlas char(1) not null,
    ukonceno char(1) not null,
    zamknuto char(1) not null,
    dat_zamek date,
    id_pozn integer,
    id_silne integer,
    id_zlepseni integer,
    id_zajmy integer,
    id_zhodnoceni integer,
    id_zamestnanec integer,
    vyp_hodn decimal(5,2),
    opr_hodn decimal(5,2),
    opr_duvod char(250),
    poz_na_zm integer not null,
    poz_usek char(100),
    poz_pracmist char(12),
    poz_termin char(50),
    poz_duvod char(50),
    poz_operace char(50),
    obdobi date not null
  );
revoke all on "mzdy".kpi_telegr from "public";

create  index "mzdy".x_kpi_teleg on "mzdy".kpi_telegr (os_cislo, cislo_pom);
{ TABLE "mzdy".kpi_prenos row size = 0 number of columns = 55 index size = 0 }
{ unload file name = kpi_prenos.unl number of rows = 0 }
create table "mzdy".kpi_prenos 
  (
    oj_kod integer,
    oj_alg integer,
    oj_par char(20),
    pm_kod integer,
    pm_alg integer,
    pm_par char(20),
    os_kod integer,
    os_alg integer,
    os_par char(20),
    par integer,
    cile integer not null,
    odbornost integer not null,
    rozv_odbornost integer not null,
    vzdel_akce integer not null,
    kompetence integer not null,
    pr_osob_pr integer not null,
    rozv_plan integer not null,
    prani_zam integer not null,
    nasl_cile integer not null,
    poznamky integer not null,
    uvodni_program integer not null,
    rozhovor integer not null,
    prip_rozhovor integer not null,
    typ_formulare integer not null,
    krit_del integer,
    count_del integer,
    krit_ost integer,
    count_ost integer,
    krit_mgr integer,
    count_mgr integer,
    krit_mgr2 integer,
    count_mgr2 integer,
    zp_del integer,
    zp_ost integer,
    zp_mgr integer,
    zp_mgr2 integer,
    skup_del integer,
    skup_ost integer,
    skup_mgr integer,
    skup_mgr2 integer,
    mer_del integer,
    mer_ost integer,
    mer_mgr integer,
    mer_mgr2 integer,
    oh_del integer,
    oh_ost integer,
    oh_mgr integer,
    oh_mgr2 integer,
    pkat_del char(20),
    pkat_ost char(20),
    pkat_mgr char(20),
    pkat_mgr2 char(20),
    hodnotitel integer,
    nadriz_hod integer,
    zamek integer
  );
revoke all on "mzdy".kpi_prenos from "public";

{ TABLE "mzdy".kpi_n_cile row size = 0 number of columns = 11 index size = 0 }
{ unload file name = kpi_n_cile.unl number of rows = 0 }
create table "mzdy".kpi_n_cile 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    typ_hodn char(1) not null,
    krit integer,
    meritko char(50),
    vaha decimal(5,2),
    skup_id integer,
    skup_hodn char(150),
    text_cile char(150),
    datum date not null
  );
revoke all on "mzdy".kpi_n_cile from "public";

create  index "mzdy".x_kpi_n_c1 on "mzdy".kpi_n_cile (os_cislo, cislo_pom);
create  index "mzdy".x_kpi_n_c on "mzdy".kpi_n_cile (os_cislo, cislo_pom, datum);
{ TABLE "mzdy".kpi_i_pl row size = 0 number of columns = 9 index size = 0 }
{ unload file name = kpi_i_pl.unl number of rows = 0 }
create table "mzdy".kpi_i_pl 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    cil char(150),
    zpusob char(100),
    termin char(50),
    rlz char(1),
    datum date not null,
    ind integer
  );
revoke all on "mzdy".kpi_i_pl from "public";

create  index "mzdy".x_kpi_i_p1 on "mzdy".kpi_i_pl (os_cislo, cislo_pom);
create  index "mzdy".x_kpi_i_p2 on "mzdy".kpi_i_pl (os_cislo, cislo_pom, datum);
{ TABLE "mzdy".kpi_hodnotitele row size = 0 number of columns = 5 index size = 0 }
{ unload file name = kpi_hodnotitele.unl number of rows = 0 }
create table "mzdy".kpi_hodnotitele 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    hodnotitel decimal(10,0) not null,
    poradi integer not null,
    akce integer not null
  );
revoke all on "mzdy".kpi_hodnotitele from "public";

create  index "mzdy".ix_kpi_hodnotitel1 on "mzdy".kpi_hodnotitele (os_cislo, cislo_pom);
create  index "mzdy".ix_kpi_hodnotitel2 on "mzdy".kpi_hodnotitele (hodnotitel);
{ TABLE "mzdy".kpi_cis_akci row size = 0 number of columns = 3 index size = 0 }
{ unload file name = kpi_cis_akci.unl number of rows = 0 }
create table "mzdy".kpi_cis_akci 
  (
    cislo integer not null,
    popis char(50) not null,
    datum date
  );
revoke all on "mzdy".kpi_cis_akci from "public";

{ TABLE "mzdy".kpi_bt_polozky row size = 0 number of columns = 23 index size = 0 }
{ unload file name = kpi_bt_polozky.unl number of rows = 0 }
create table "mzdy".kpi_bt_polozky 
  (
    id integer not null,
    id_hodn integer not null,
    menu integer not null,
    zalozka integer not null,
    podzalozka integer not null,
    radek integer not null,
    typ char(2),
    head1 char(40),
    text1 char(250),
    id_text1 integer,
    procento1 integer,
    datum1 date,
    datum2 date,
    priznak1 char(1) not null,
    text2 char(250),
    id_text2 integer,
    odkaz1 integer,
    hotovo integer,
    typ_ukolu integer,
    text3 char(250),
    text4 char(250),
    text5 char(250),
    priznak2 char(1) not null
  );
revoke all on "mzdy".kpi_bt_polozky from "public";

create  index "mzdy".x_kpi_bt_polozky on "mzdy".kpi_bt_polozky (id_hodn, menu, zalozka, podzalozka, radek);
{ TABLE "mzdy".kpi_bt_hlavicky row size = 0 number of columns = 31 index size = 0 }
{ unload file name = kpi_bt_hlavicky.unl number of rows = 0 }
create table "mzdy".kpi_bt_hlavicky 
  (
    id integer not null,
    typ_hodn char(1) not null,
    akce integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    id_pracmista integer,
    datum date,
    vyhod decimal(10,0),
    schvalil decimal(10,0),
    obeznamen char(1) not null,
    dat_obezn date,
    souhlas char(1) not null,
    ukonceno char(1) not null,
    zamknuto char(1) not null,
    dat_zamek date,
    id_pozn integer,
    id_silne integer,
    id_zlepseni integer,
    id_zajmy integer,
    id_zhodnoceni integer,
    id_zamestnanec integer,
    vyp_hodn decimal(5,2),
    opr_hodn decimal(5,2),
    opr_duvod char(100),
    poz_na_zm integer not null,
    poz_usek char(100),
    poz_pracmist char(10),
    poz_termin char(50),
    poz_duvod char(50),
    poz_operace char(50),
    obdobi date not null
  );
revoke all on "mzdy".kpi_bt_hlavicky from "public";

create  index "mzdy".x_kpi_bt_hlavicky on "mzdy".kpi_bt_hlavicky (os_cislo, cislo_pom);
{ TABLE "mzdy".kpi_bt_cis_ukolu row size = 0 number of columns = 3 index size = 0 }
{ unload file name = kpi_bt_cis_ukolu.unl number of rows = 0 }
create table "mzdy".kpi_bt_cis_ukolu 
  (
    cislo integer not null,
    popis char(40) not null,
    datum date
  );
revoke all on "mzdy".kpi_bt_cis_ukolu from "public";

{ TABLE "mzdy".kpi_bt_cis_akci row size = 0 number of columns = 3 index size = 0 }
{ unload file name = kpi_bt_cis_akci.unl number of rows = 0 }
create table "mzdy".kpi_bt_cis_akci 
  (
    cislo integer not null,
    popis char(50) not null,
    datum date
  );
revoke all on "mzdy".kpi_bt_cis_akci from "public";

{ TABLE "mzdy".kpi row size = 0 number of columns = 9 index size = 0 }
{ unload file name = kpi.unl number of rows = 0 }
create table "mzdy".kpi 
  (
    id integer not null,
    org_jed char(5),
    os_cislo decimal(10,0),
    cislo_pom integer,
    id_pracmist integer,
    kpi integer not null,
    vaha integer not null,
    plati_od date,
    plati_do date
  );
revoke all on "mzdy".kpi from "public";

{ TABLE "mzdy".konta_porizeni row size = 0 number of columns = 14 index size = 0 }
{ unload file name = konta_porizeni.unl number of rows = 0 }
create table "mzdy".konta_porizeni 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    prac_str char(10) not null,
    kod integer not null,
    dny decimal(3,1),
    hodiny decimal(5,2),
    sazba decimal(16,2),
    castka decimal(16,2),
    datum_od date,
    datum_do date,
    tyden_od date not null,
    tyden_do date not null,
    datum date not null
  );
revoke all on "mzdy".konta_porizeni from "public";

create  index "mzdy".ix_konta_poriz on "mzdy".konta_porizeni (datum);
create  index "mzdy".ix_konta_poriz2 on "mzdy".konta_porizeni (os_cislo, cislo_pom, tyden_od, tyden_do);
{ TABLE "mzdy".konta_kody row size = 0 number of columns = 7 index size = 0 }
{ unload file name = konta_kody.unl number of rows = 0 }
create table "mzdy".konta_kody 
  (
    kod integer not null,
    dny char(1),
    hodiny char(1),
    sazba char(1),
    castka char(1),
    dat_od char(1),
    dat_do char(1)
  );
revoke all on "mzdy".konta_kody from "public";

create unique  index "mzdy".ix_konta_kody on "mzdy".konta_kody (kod);
{ TABLE "mzdy".kompetence_typy row size = 0 number of columns = 4 index size = 0 }
{ unload file name = kompetence_typy.unl number of rows = 2 }
create table "mzdy".kompetence_typy 
  (
    typ_kompetenci integer,
    nazev_typu char(50),
    skupina integer,
    vaha integer
  );
revoke all on "mzdy".kompetence_typy from "public";

create  index "mzdy".ix_typ_komp1 on "mzdy".kompetence_typy (skupina);
{ TABLE "mzdy".kompetence_osvedc row size = 0 number of columns = 2 index size = 0 }
{ unload file name = kompetence_osvedc.unl number of rows = 0 }
create table "mzdy".kompetence_osvedc 
  (
    cislo char(7) not null,
    cis_osve char(10) not null
  );
revoke all on "mzdy".kompetence_osvedc from "public";

create unique  index "mzdy".ix_komp_osv on "mzdy".kompetence_osvedc (cislo, cis_osve);
{ TABLE "mzdy".kompetence row size = 0 number of columns = 8 index size = 0 }
{ unload file name = kompetence.unl number of rows = 14 }
create table "mzdy".kompetence 
  (
    cislo char(7) not null,
    vyznam char(120),
    popis char(250),
    typ_kompetenci integer,
    stupnice integer,
    uroven decimal(4,1),
    max_uroven decimal(4,1),
    id_blobu integer
  );
revoke all on "mzdy".kompetence from "public";

create  index "mzdy".ix_komp1 on "mzdy".kompetence (typ_kompetenci);
{ TABLE "mzdy".kompeten_stupverze row size = 0 number of columns = 6 index size = 0 }
{ unload file name = kompeten_stupverze.unl number of rows = 2 }
create table "mzdy".kompeten_stupverze 
  (
    verze_stupnu integer not null,
    popis_verze char(120),
    typ_kompetenci integer not null,
    aktivni char(1) not null,
    poradi_min integer,
    poradi_max integer
  );
revoke all on "mzdy".kompeten_stupverze from "public";

{ TABLE "mzdy".kompeten_stupnityp row size = 0 number of columns = 2 index size = 0 }
{ unload file name = kompeten_stupnityp.unl number of rows = 0 }
create table "mzdy".kompeten_stupnityp 
  (
    typ_stupnice integer,
    nazev_typu char(50)
  );
revoke all on "mzdy".kompeten_stupnityp from "public";

{ TABLE "mzdy".kompeten_stupne row size = 0 number of columns = 7 index size = 0 }
{ unload file name = kompeten_stupne.unl number of rows = 0 }
create table "mzdy".kompeten_stupne 
  (
    id_stupne_komp integer not null,
    poradi_stupne integer not null,
    popis_stupne char(80),
    typ_kompetenci integer not null,
    verze_stupnu integer not null,
    id_definice integer,
    procento decimal(6,2)
  );
revoke all on "mzdy".kompeten_stupne from "public";

{ TABLE "mzdy".kody_uc2 row size = 0 number of columns = 2 index size = 0 }
{ unload file name = kody_uc2.unl number of rows = 0 }
create table "mzdy".kody_uc2 
  (
    kod_uc2 integer not null,
    nazev char(60)
  );
revoke all on "mzdy".kody_uc2 from "public";

create  index "mzdy".ix_kod_uc2 on "mzdy".kody_uc2 (kod_uc2);
{ TABLE "mzdy".kody_uc_zp row size = 0 number of columns = 4 index size = 0 }
{ unload file name = kody_uc_zp.unl number of rows = 0 }
create table "mzdy".kody_uc_zp 
  (
    cis_poj integer not null,
    kod integer not null,
    kod_uc integer,
    kod_uc2 integer
  );
revoke all on "mzdy".kody_uc_zp from "public";

{ TABLE "mzdy".kody_uc_str row size = 0 number of columns = 4 index size = 0 }
{ unload file name = kody_uc_str.unl number of rows = 0 }
create table "mzdy".kody_uc_str 
  (
    kod integer not null,
    stred char(23) not null,
    kod_uc integer not null,
    kod_uc2 integer
  );
revoke all on "mzdy".kody_uc_str from "public";

{ TABLE "mzdy".kontr_leceb_rez row size = 0 number of columns = 6 index size = 0 }
{ unload file name = kontr_leceb_rez.unl number of rows = 0 }
create table "mzdy".kontr_leceb_rez 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    druh integer,
    datum date,
    dat_prevzeti date,
    poznamka char(100)
  );
revoke all on "mzdy".kontr_leceb_rez from "public";

create  index "mzdy".ix_prac_kazen on "mzdy".kontr_leceb_rez (os_cislo);
{ TABLE "mzdy".kody_indik row size = 0 number of columns = 3 index size = 0 }
{ unload file name = kody_indik.unl number of rows = 176 }
create table "mzdy".kody_indik 
  (
    kod integer not null,
    indikace char(3) not null,
    prisl char(1)
  );
revoke all on "mzdy".kody_indik from "public";

create unique  index "mzdy".ix_kod_ind1 on "mzdy".kody_indik (kod, indikace);
create  index "mzdy".ix_kod_ind2 on "mzdy".kody_indik (kod, indikace, prisl);
{ TABLE "mzdy".kody_hr_datart row size = 0 number of columns = 5 index size = 0 }
{ unload file name = kody_hr_datart.unl number of rows = 0 }
create table "mzdy".kody_hr_datart 
  (
    druh_sest integer not null,
    verze integer,
    poradi integer not null,
    nazev char(10),
    kody char(500)
  );
revoke all on "mzdy".kody_hr_datart from "public";

{ TABLE "mzdy".kod_nv row size = 0 number of columns = 6 index size = 0 }
{ unload file name = kod_nv.unl number of rows = 30 }
create table "mzdy".kod_nv 
  (
    cis_kodu char(3) not null,
    nazev char(80) not null,
    indikace integer not null,
    archiv char(1),
    nedobrovolny char(1),
    kod_cssz integer
  );
revoke all on "mzdy".kod_nv from "public";

{ TABLE "mzdy".klient_cs row size = 0 number of columns = 7 index size = 0 }
{ unload file name = klient_cs.unl number of rows = 0 }
create table "mzdy".klient_cs 
  (
    c_klienta integer,
    nazev char(20),
    por_cis_soub integer,
    crc char(1),
    typ_disku char(7),
    cis_uctu char(20),
    ktery_kraj integer
  );
revoke all on "mzdy".klient_cs from "public";

{ TABLE "mzdy".katalog_praci row size = 0 number of columns = 5 index size = 0 }
{ unload file name = katalog_praci.unl number of rows = 0 }
create table "mzdy".katalog_praci 
  (
    verze integer not null,
    kod char(9) not null,
    trida integer not null,
    bod integer not null,
    popis char(2000)
  );
revoke all on "mzdy".katalog_praci from "public";

{ TABLE "mzdy".kody_uc row size = 0 number of columns = 28 index size = 0 }
{ unload file name = kody_uc.unl number of rows = 43 }
create table "mzdy".kody_uc 
  (
    kod_uc integer,
    id_podniku integer,
    sada integer,
    ucet_md char(10),
    ucet_dal char(10),
    nazev char(80),
    nazev2 char(250),
    dopl_info char(30),
    dopl_info2 char(54),
    dopl_info3 char(54),
    dopl_info4 char(40),
    dopl_info5 char(40),
    dopl_info6 char(40),
    dopl_info7 char(40),
    dopl_info8 char(40),
    md_odpa char(6),
    md_pol char(4),
    md_zp char(3),
    md_uz char(8),
    md_orj char(4),
    md_org char(13),
    dal_odpa char(6),
    dal_pol char(4),
    dal_zp char(3),
    dal_uz char(8),
    dal_orj char(4),
    dal_org char(13),
    koef decimal(5,2)
  );
revoke all on "mzdy".kody_uc from "public";

{ TABLE "mzdy".konv_stred_ppf row size = 0 number of columns = 3 index size = 0 }
{ unload file name = konv_stred_ppf.unl number of rows = 0 }
create table "mzdy".konv_stred_ppf 
  (
    stred char(10) not null,
    nakl_str char(20),
    lokace char(20)
  );
revoke all on "mzdy".konv_stred_ppf from "public";

{ TABLE "mzdy".konverze_klic row size = 0 number of columns = 2 index size = 0 }
{ unload file name = konverze_klic.unl number of rows = 0 }
create table "mzdy".konverze_klic 
  (
    id integer not null,
    klic char(512)
  );
revoke all on "mzdy".konverze_klic from "public";

{ TABLE "mzdy".konverze_data row size = 0 number of columns = 3 index size = 0 }
{ unload file name = konverze_data.unl number of rows = 0 }
create table "mzdy".konverze_data 
  (
    id_klice integer not null,
    puvodni_hodnota char(128) not null,
    nova_hodnota char(128)
  );
revoke all on "mzdy".konverze_data from "public";

{ TABLE "mzdy".jaz_znal row size = 0 number of columns = 6 index size = 0 }
{ unload file name = jaz_znal.unl number of rows = 1 }
create table "mzdy".jaz_znal 
  (
    id_jaz_znal integer not null,
    os_cislo decimal(10,0) not null,
    jazyk char(10) not null,
    stupen char(2) not null,
    druh_zkousky char(20),
    datum date
  );
revoke all on "mzdy".jaz_znal from "public";

create  index "mzdy".ix_jaz_znal on "mzdy".jaz_znal (os_cislo, jazyk, stupen);
{ TABLE "mzdy".invalide row size = 0 number of columns = 4 index size = 0 }
{ unload file name = invalide.unl number of rows = 9 }
create table "mzdy".invalide 
  (
    os_cislo decimal(10,0) not null,
    stupen char(2),
    dat_od date,
    dat_do date
  );
revoke all on "mzdy".invalide from "public";

{ TABLE "mzdy".isoss_prenos row size = 0 number of columns = 10 index size = 0 }
{ unload file name = isoss_prenos.unl number of rows = 0 }
create table "mzdy".isoss_prenos 
  (
    id integer not null,
    id_ext integer,
    id_zprava char(36),
    datum_cas char(17),
    modul char(4),
    zpusob char(2),
    druh char(1),
    typ char(1),
    status char(1),
    id_blob integer
  );
revoke all on "mzdy".isoss_prenos from "public";

{ TABLE "mzdy".isoss_prenos_info row size = 0 number of columns = 14 index size = 0 }
{ unload file name = isoss_prenos_info.unl number of rows = 0 }
create table "mzdy".isoss_prenos_info 
  (
    id integer not null,
    id_dbarch integer,
    typ char(1),
    cislo integer,
    klic char(100),
    tabulka char(18),
    sloupec char(18),
    podminka char(200),
    os_cislo decimal(10,0),
    cislo_pom integer,
    zam_id_ext char(8),
    status char(1),
    text char(200),
    hlaseni_typmax char(1)
  );
revoke all on "mzdy".isoss_prenos_info from "public";

create  index "mzdy".ix_isossi_id on "mzdy".isoss_prenos_info (id);
create  index "mzdy".ix_isossi_dbarch on "mzdy".isoss_prenos_info (id_dbarch);
{ TABLE "mzdy".info_blob2 row size = 0 number of columns = 6 index size = 0 }
{ unload file name = info_blob2.unl number of rows = 4653 }
create table "mzdy".info_blob2 
  (
    id integer not null,
    md5 char(32),
    pripona char(10),
    kodovani integer,
    komprese integer,
    sdil_uloz char(1)
  );
revoke all on "mzdy".info_blob2 from "public";

create  index "mzdy".ix_ib2_md5 on "mzdy".info_blob2 (md5);
{ TABLE "mzdy".insr_osoba row size = 0 number of columns = 6 index size = 0 }
{ unload file name = insr_osoba.unl number of rows = 0 }
create table "mzdy".insr_osoba 
  (
    rc char(10),
    spis_znacka char(50),
    druh_osoby char(10),
    datum_zmeny date,
    stav_konkurzu char(20),
    relevance_vysl char(120)
  );
revoke all on "mzdy".insr_osoba from "public";

create  index "mzdy".ix_spis_znacka on "mzdy".insr_osoba (spis_znacka);
{ TABLE "mzdy".info_blob_klice row size = 0 number of columns = 3 index size = 0 }
{ unload file name = info_blob_klice.unl number of rows = 0 }
create table "mzdy".info_blob_klice 
  (
    klic char(32) not null,
    popis_klice char(250),
    id_blobu integer not null
  );
revoke all on "mzdy".info_blob_klice from "public";

{ TABLE "mzdy".infop_uziv row size = 0 number of columns = 4 index size = 0 }
{ unload file name = infop_uziv.unl number of rows = 0 }
create table "mzdy".infop_uziv 
  (
    dsk_id char(28) not null,
    uzivatel char(64) not null,
    poradi integer,
    vlastnik char(1) not null
  );
revoke all on "mzdy".infop_uziv from "public";

{ TABLE "mzdy".hz_sez_sta_pri row size = 0 number of columns = 2 index size = 0 }
{ unload file name = hz_sez_sta_pri.unl number of rows = 0 }
create table "mzdy".hz_sez_sta_pri 
  (
    cislo integer not null,
    status char(16) not null
  );
revoke all on "mzdy".hz_sez_sta_pri from "public";

{ TABLE "mzdy".hz_sez_hodnotitel row size = 0 number of columns = 4 index size = 0 }
{ unload file name = hz_sez_hodnotitel.unl number of rows = 0 }
create table "mzdy".hz_sez_hodnotitel 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    status integer,
    stav integer
  );
revoke all on "mzdy".hz_sez_hodnotitel from "public";

{ TABLE "mzdy".hz_sab_slo row size = 0 number of columns = 9 index size = 0 }
{ unload file name = hz_sab_slo.unl number of rows = 0 }
create table "mzdy".hz_sab_slo 
  (
    idp integer not null,
    druh integer not null,
    pc integer not null,
    pozadavek integer not null,
    popis char(64),
    poznamka char(250),
    priznak integer,
    sta_edt integer not null,
    id_blobu integer
  );
revoke all on "mzdy".hz_sab_slo from "public";

{ TABLE "mzdy".hz_sab_pol row size = 0 number of columns = 7 index size = 0 }
{ unload file name = hz_sab_pol.unl number of rows = 0 }
create table "mzdy".hz_sab_pol 
  (
    idp integer not null,
    pc integer not null,
    pozadavek char(8),
    body_poz integer,
    popis char(64),
    poznamka char(250),
    vaha integer not null
  );
revoke all on "mzdy".hz_sab_pol from "public";

{ TABLE "mzdy".hz_sab_mot row size = 0 number of columns = 5 index size = 0 }
{ unload file name = hz_sab_mot.unl number of rows = 0 }
create table "mzdy".hz_sab_mot 
  (
    idp integer not null,
    pc integer not null,
    pozadavek integer not null,
    popis char(64),
    poznamka char(250)
  );
revoke all on "mzdy".hz_sab_mot from "public";

{ TABLE "mzdy".hz_sab_hla row size = 0 number of columns = 22 index size = 0 }
{ unload file name = hz_sab_hla.unl number of rows = 0 }
create table "mzdy".hz_sab_hla 
  (
    id integer not null,
    cislo char(32),
    nazev char(64) not null,
    popis char(250),
    hodnotil decimal(10,0),
    schvalil decimal(10,0),
    dat_od date not null,
    dat_do date,
    nacitat_ppm_komp integer not null,
    nacitat_ppm_cile integer not null,
    nacitat_min_ncile integer not null,
    druh_hodnoceni integer,
    duvod_zpracovani integer,
    personalni_rezerva integer,
    hod_pro_slu_mis integer,
    zv_kom integer,
    zv_cil integer,
    zv_ncil integer,
    zv_slo integer,
    zv_mot integer,
    zv_roz integer,
    zv_sko integer
  );
revoke all on "mzdy".hz_sab_hla from "public";

{ TABLE "mzdy".hz_sab_cil row size = 0 number of columns = 7 index size = 0 }
{ unload file name = hz_sab_cil.unl number of rows = 0 }
create table "mzdy".hz_sab_cil 
  (
    idp integer not null,
    druh integer not null,
    pc integer not null,
    cil integer not null,
    text char(250),
    vaha integer,
    ocek_vystup char(250)
  );
revoke all on "mzdy".hz_sab_cil from "public";

{ TABLE "mzdy".hz_sko_otazky row size = 0 number of columns = 7 index size = 0 }
{ unload file name = hz_sko_otazky.unl number of rows = 0 }
create table "mzdy".hz_sko_otazky 
  (
    id integer not null,
    cislo char(7) not null,
    vyznam char(120),
    poradi integer,
    pouzivano integer not null,
    zobrazovat integer not null,
    vaha integer
  );
revoke all on "mzdy".hz_sko_otazky from "public";

{ TABLE "mzdy".hz_sko_hodnoceni row size = 0 number of columns = 6 index size = 0 }
{ unload file name = hz_sko_hodnoceni.unl number of rows = 0 }
create table "mzdy".hz_sko_hodnoceni 
  (
    id integer not null,
    idp integer not null,
    p_cislo integer,
    otazka char(7),
    hodnoceni decimal(4,2),
    poznamka char(200)
  );
revoke all on "mzdy".hz_sko_hodnoceni from "public";

create  index "mzdy".ix_hz_sko_hodn on "mzdy".hz_sko_hodnoceni (idp, p_cislo);
{ TABLE "mzdy".hz_sez_sku_cil row size = 0 number of columns = 12 index size = 0 }
{ unload file name = hz_sez_sku_cil.unl number of rows = 0 }
create table "mzdy".hz_sez_sku_cil 
  (
    id integer not null,
    id_ha integer,
    typ integer,
    poradi integer,
    id_sku integer not null,
    vaha integer,
    d_limit integer,
    a_limit integer,
    h_limit integer,
    zadrzne integer,
    id_adresati integer,
    datum date
  );
revoke all on "mzdy".hz_sez_sku_cil from "public";

create unique  index "mzdy".ix_hz_sscil on "mzdy".hz_sez_sku_cil (id_ha, poradi);
{ TABLE "mzdy".hz_sku_cil row size = 0 number of columns = 13 index size = 0 }
{ unload file name = hz_sku_cil.unl number of rows = 0 }
create table "mzdy".hz_sku_cil 
  (
    id integer not null,
    id_ha integer not null,
    id_sku integer not null,
    pc integer not null,
    cil integer not null,
    text char(250),
    vaha integer,
    hodnoceni integer,
    termin date,
    hodnota decimal(12,2),
    poznamka char(250),
    id_poznamky integer,
    datum date not null
  );
revoke all on "mzdy".hz_sku_cil from "public";

create  index "mzdy".ix_hz_scil on "mzdy".hz_sku_cil (id_ha, id_sku);
{ TABLE "mzdy".hz_sku_cil_ext row size = 0 number of columns = 6 index size = 0 }
{ unload file name = hz_sku_cil_ext.unl number of rows = 0 }
create table "mzdy".hz_sku_cil_ext 
  (
    id integer not null,
    id_hla integer not null,
    id_cile integer not null,
    hodnoceni integer,
    hodnota decimal(12,2),
    datum date not null
  );
revoke all on "mzdy".hz_sku_cil_ext from "public";

create unique  index "mzdy".ix_hz_scil_ext on "mzdy".hz_sku_cil_ext (id_hla, id_cile);
{ TABLE "mzdy".hz_kost row size = 0 number of columns = 3 index size = 0 }
{ unload file name = hz_kost.unl number of rows = 0 }
create table "mzdy".hz_kost 
  (
    id_kompetence char(7) not null,
    id_stupne integer not null,
    id_definice integer
  );
revoke all on "mzdy".hz_kost from "public";

{ TABLE "mzdy".hz_parametry row size = 0 number of columns = 9 index size = 0 }
{ unload file name = hz_parametry.unl number of rows = 0 }
create table "mzdy".hz_parametry 
  (
    polozka char(24) not null,
    nazev char(120) not null,
    hodnota char(120) not null,
    popis char(250),
    plati_od date,
    plati_do date,
    datum date,
    syskod integer,
    skupina decimal(7,2)
  );
revoke all on "mzdy".hz_parametry from "public";

create unique  index "mzdy".ix_hz_param on "mzdy".hz_parametry (polozka, hodnota, plati_od);
{ TABLE "mzdy".hz_pozadavky_typy row size = 0 number of columns = 2 index size = 0 }
{ unload file name = hz_pozadavky_typy.unl number of rows = 0 }
create table "mzdy".hz_pozadavky_typy 
  (
    typ_pozadavku integer,
    nazev_typu char(50)
  );
revoke all on "mzdy".hz_pozadavky_typy from "public";

create unique  index "mzdy".ix_hz_typ_poz on "mzdy".hz_pozadavky_typy (typ_pozadavku, nazev_typu);
{ TABLE "mzdy".hz_hod_vcasovosti row size = 0 number of columns = 5 index size = 0 }
{ unload file name = hz_hod_vcasovosti.unl number of rows = 0 }
create table "mzdy".hz_hod_vcasovosti 
  (
    id integer not null,
    id_hla integer not null,
    obdobi_od date not null,
    obdobi_do date not null,
    datum date not null
  );
revoke all on "mzdy".hz_hod_vcasovosti from "public";

{ TABLE "mzdy".hz_hod_uko row size = 0 number of columns = 11 index size = 0 }
{ unload file name = hz_hod_uko.unl number of rows = 0 }
create table "mzdy".hz_hod_uko 
  (
    idp integer not null,
    pc integer not null,
    ukol integer,
    popis char(250) not null,
    mnozstvi integer,
    termin date,
    splneno date,
    status date,
    hodnoceni integer,
    zdroj integer not null,
    datum date not null
  );
revoke all on "mzdy".hz_hod_uko from "public";

{ TABLE "mzdy".hz_hod_roz row size = 0 number of columns = 17 index size = 0 }
{ unload file name = hz_hod_roz.unl number of rows = 0 }
create table "mzdy".hz_hod_roz 
  (
    id integer not null,
    idp integer not null,
    pc integer not null,
    cil char(10),
    text char(250),
    zpusob char(7),
    termin date,
    absolvovano date,
    rlz char(1),
    datum date,
    ind integer,
    typ integer,
    poznamka char(250),
    kompetence char(7),
    schvaleno integer,
    cena decimal(16,2),
    id_blobu integer
  );
revoke all on "mzdy".hz_hod_roz from "public";

create  index "mzdy".x_hod_roz on "mzdy".hz_hod_roz (idp, cil);
{ TABLE "mzdy".hz_hod_poz row size = 0 number of columns = 4 index size = 0 }
{ unload file name = hz_hod_poz.unl number of rows = 0 }
create table "mzdy".hz_hod_poz 
  (
    id integer not null,
    idp integer not null,
    os_cislo decimal(10,0) not null,
    zdroj integer not null
  );
revoke all on "mzdy".hz_hod_poz from "public";

create  index "mzdy".ix_hz_hod_poz on "mzdy".hz_hod_poz (os_cislo);
{ TABLE "mzdy".hz_hod_slo row size = 0 number of columns = 12 index size = 0 }
{ unload file name = hz_hod_slo.unl number of rows = 0 }
create table "mzdy".hz_hod_slo 
  (
    idp integer not null,
    druh integer not null,
    pc integer not null,
    pozadavek integer not null,
    popis char(64),
    poznamka char(250),
    id_blobu integer,
    parametr1 integer,
    priznak integer,
    sta_edt integer not null,
    termin date,
    hodnoceni integer
  );
revoke all on "mzdy".hz_hod_slo from "public";

{ TABLE "mzdy".hz_hod_sko row size = 0 number of columns = 14 index size = 0 }
{ unload file name = hz_hod_sko.unl number of rows = 0 }
create table "mzdy".hz_hod_sko 
  (
    id integer not null,
    idp integer not null,
    pc integer not null,
    p_cislo integer,
    cis_osve char(10) not null,
    splneno char(1),
    hodnoceni decimal(5,2),
    doporuceni char(250),
    termin date,
    absolvovano date,
    ind integer,
    datum date not null,
    zdroj integer,
    zpusob char(7)
  );
revoke all on "mzdy".hz_hod_sko from "public";

create  index "mzdy".x_hod_sko on "mzdy".hz_hod_sko (idp, pc);
{ TABLE "mzdy".info_blob row size = 0 number of columns = 7 index size = 0 }
{ unload file name = info_blob.unl number of rows = 0 }
create table "mzdy".info_blob 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    pouziti integer not null,
    datum_od date,
    datum_do date,
    informace byte
  );
revoke all on "mzdy".info_blob from "public";

create  index "mzdy".i_infoblob on "mzdy".info_blob (os_cislo, pouziti);
{ TABLE "mzdy".indiv_kal_vyr_obd row size = 0 number of columns = 4 index size = 0 }
{ unload file name = indiv_kal_vyr_obd.unl number of rows = 0 }
create table "mzdy".indiv_kal_vyr_obd 
  (
    cis_rozvrhu integer not null,
    datum_od date not null,
    datum_do date not null,
    proc_prumeru decimal(5,2)
  );
revoke all on "mzdy".indiv_kal_vyr_obd from "public";

{ TABLE "mzdy".indiv_kal_dny row size = 0 number of columns = 6 index size = 0 }
{ unload file name = indiv_kal_dny.unl number of rows = 92 }
create table "mzdy".indiv_kal_dny 
  (
    cis_rozvrhu integer not null,
    kal_den date not null,
    smena char(2),
    pocet_hodin decimal(5,2),
    zac_sm char(4),
    hodiny_skutec decimal(5,2)
  );
revoke all on "mzdy".indiv_kal_dny from "public";

{ TABLE "mzdy".indiv_kal row size = 0 number of columns = 10 index size = 0 }
{ unload file name = indiv_kal.unl number of rows = 2 }
create table "mzdy".indiv_kal 
  (
    cis_rozvrhu integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    typ integer not null,
    davka integer,
    predvyp_typ_kal integer,
    predvyp_smena integer,
    predvyplnovat integer,
    pouzit_prikonckpd integer,
    svatky char(1)
  );
revoke all on "mzdy".indiv_kal from "public";

create unique  index "mzdy".ix_indiv_kal on "mzdy".indiv_kal (os_cislo, cislo_pom, typ);
{ TABLE "mzdy".id_platby row size = 0 number of columns = 11 index size = 0 }
{ unload file name = id_platby.unl number of rows = 0 }
create table "mzdy".id_platby 
  (
    os_cislo decimal(10,0),
    kod integer,
    banka char(4),
    cislo_uctu char(20),
    var_symb char(10),
    spec_symb char(10),
    konst_symb char(4),
    id_platba char(2),
    id_cislo integer not null,
    swift char(11),
    iban char(28)
  );
revoke all on "mzdy".id_platby from "public";

{ TABLE "mzdy".hz_hist_verzi row size = 0 number of columns = 3 index size = 0 }
{ unload file name = hz_hist_verzi.unl number of rows = 0 }
create table "mzdy".hz_hist_verzi 
  (
    id_akce integer not null,
    typ_kompetenci integer not null,
    verze_stupnu integer not null
  );
revoke all on "mzdy".hz_hist_verzi from "public";

{ TABLE "mzdy".hz_his_hodnotitel row size = 0 number of columns = 5 index size = 0 }
{ unload file name = hz_his_hodnotitel.unl number of rows = 0 }
create table "mzdy".hz_his_hodnotitel 
  (
    id_akce integer not null,
    os_cislo decimal(10,0) not null,
    id_hodnotitele integer not null,
    status integer,
    zdroj integer
  );
revoke all on "mzdy".hz_his_hodnotitel from "public";

{ TABLE "mzdy".hz_h2m row size = 0 number of columns = 16 index size = 0 }
{ unload file name = hz_h2m.unl number of rows = 0 }
create table "mzdy".hz_h2m 
  (
    id integer not null,
    idh integer not null,
    id_ha integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    stredisko char(10),
    prac_str char(10),
    id_pracmist integer,
    kod integer,
    typ integer not null,
    vkoeficient decimal(6,2) not null,
    koeficient decimal(6,2),
    vcastka decimal(10,2) not null,
    castka decimal(10,2),
    obdobi date not null,
    datum date not null
  );
revoke all on "mzdy".hz_h2m from "public";

create  index "mzdy".ix_h2m on "mzdy".hz_h2m (datum, os_cislo, cislo_pom, kod);
{ TABLE "mzdy".hz_cis_stupne_slo row size = 0 number of columns = 5 index size = 0 }
{ unload file name = hz_cis_stupne_slo.unl number of rows = 0 }
create table "mzdy".hz_cis_stupne_slo 
  (
    id_stupne_slo integer not null,
    poradi_stupne integer not null,
    popis_stupne char(80),
    typ_slo integer not null,
    verze_stupnu integer not null
  );
revoke all on "mzdy".hz_cis_stupne_slo from "public";

{ TABLE "mzdy".hz_def_krivek row size = 0 number of columns = 5 index size = 0 }
{ unload file name = hz_def_krivek.unl number of rows = 0 }
create table "mzdy".hz_def_krivek 
  (
    id integer not null,
    idp integer not null,
    sx integer not null,
    sy integer not null,
    smernice decimal(4,2)
  );
revoke all on "mzdy".hz_def_krivek from "public";

create unique  index "mzdy".ix_hz_def_kri on "mzdy".hz_def_krivek (idp, sx, sy);
{ TABLE "mzdy".hz_h2wf row size = 0 number of columns = 18 index size = 0 }
{ unload file name = hz_h2wf.unl number of rows = 0 }
create table "mzdy".hz_h2wf 
  (
    id integer not null,
    idh integer not null,
    id_ha integer not null,
    id_workflow integer,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    os_cislo_resitele decimal(10,0),
    id_cile integer not null,
    cil integer not null,
    text char(250),
    vaha integer,
    hodnoceni integer,
    vkoeficient decimal(6,2) not null,
    vcastka decimal(10,2) not null,
    mcastka decimal(10,2),
    kod integer,
    obdobi date not null,
    datum date not null
  );
revoke all on "mzdy".hz_h2wf from "public";

create  index "mzdy".ix_h2wf on "mzdy".hz_h2wf (datum, os_cislo, cislo_pom);
{ TABLE "mzdy".hz3_nastaveni row size = 0 number of columns = 33 index size = 0 }
{ unload file name = hz3_nastaveni.unl number of rows = 0 }
create table "mzdy".hz3_nastaveni 
  (
    id integer not null,
    part char(20),
    nadpis char(150),
    s0 char(20),
    s1 char(20),
    s2 char(20),
    s3 char(20),
    s4 char(20),
    s5 char(20),
    s6 char(20),
    s7 char(20),
    s8 char(20),
    s9 char(20),
    i0 integer not null,
    i1 integer not null,
    i2 integer not null,
    i3 integer not null,
    i4 integer not null,
    i5 integer not null,
    i6 integer not null,
    i7 integer not null,
    i8 integer not null,
    i9 integer not null,
    i10 integer not null,
    i11 integer not null,
    i12 integer not null,
    i13 integer not null,
    i14 integer not null,
    i15 integer not null,
    i16 integer not null,
    i17 integer not null,
    i18 integer not null,
    i19 integer not null
  );
revoke all on "mzdy".hz3_nastaveni from "public";

{ TABLE "mzdy".hz3_ncile row size = 0 number of columns = 9 index size = 0 }
{ unload file name = hz3_ncile.unl number of rows = 0 }
create table "mzdy".hz3_ncile 
  (
    id integer not null,
    idp integer,
    skupina integer,
    cil integer not null,
    cil_text char(250),
    vaha integer,
    hodnoceni decimal(10,2),
    vypocet integer,
    datum date not null
  );
revoke all on "mzdy".hz3_ncile from "public";

create  index "mzdy".ix_hz3_ncile on "mzdy".hz3_ncile (idp);
{ TABLE "mzdy".hz3_prani row size = 0 number of columns = 9 index size = 0 }
{ unload file name = hz3_prani.unl number of rows = 0 }
create table "mzdy".hz3_prani 
  (
    id integer not null,
    idp integer,
    poz_na_zmenu integer,
    usek char(255),
    prac_mist char(12),
    termin char(50),
    duvod char(255),
    operace char(50),
    datum date not null
  );
revoke all on "mzdy".hz3_prani from "public";

create  index "mzdy".ix_hz3_prani on "mzdy".hz3_prani (idp);
{ TABLE "mzdy".hz3_ukoly row size = 0 number of columns = 10 index size = 0 }
{ unload file name = hz3_ukoly.unl number of rows = 0 }
create table "mzdy".hz3_ukoly 
  (
    id integer not null,
    idp integer not null,
    ukol integer not null,
    ukol_popis char(250) not null,
    zdroj char(1) not null,
    status char(1) not null,
    hodnoceni decimal(10,2),
    termin date not null,
    splneno date,
    datum date
  );
revoke all on "mzdy".hz3_ukoly from "public";

create  index "mzdy".ix_hz3_ukoly on "mzdy".hz3_ukoly (idp);
{ TABLE "mzdy".hz3_vahy2cile row size = 0 number of columns = 3 index size = 0 }
{ unload file name = hz3_vahy2cile.unl number of rows = 0 }
create table "mzdy".hz3_vahy2cile 
  (
    funkce integer not null,
    vaha integer not null,
    kriter integer
  );
revoke all on "mzdy".hz3_vahy2cile from "public";

{ TABLE "mzdy".hz_cis_fincilu row size = 0 number of columns = 2 index size = 0 }
{ unload file name = hz_cis_fincilu.unl number of rows = 0 }
create table "mzdy".hz_cis_fincilu 
  (
    kod_zeme char(3) not null,
    fin_cil decimal(14,2)
  );
revoke all on "mzdy".hz_cis_fincilu from "public";

{ TABLE "mzdy".hz_cis_akce row size = 0 number of columns = 10 index size = 0 }
{ unload file name = hz_cis_akce.unl number of rows = 0 }
create table "mzdy".hz_cis_akce 
  (
    id integer not null,
    cislo integer,
    nazev char(64) not null,
    popis char(250),
    periodicky integer not null,
    perioda integer not null,
    zamek integer not null,
    portal integer not null,
    typ_vypoctu integer not null,
    bcolor integer
  );
revoke all on "mzdy".hz_cis_akce from "public";

{ TABLE "mzdy".hz_akce_ucast row size = 0 number of columns = 13 index size = 0 }
{ unload file name = hz_akce_ucast.unl number of rows = 0 }
create table "mzdy".hz_akce_ucast 
  (
    id integer not null,
    id_pha integer,
    os_cislo decimal(10,0),
    cislo_pom integer not null,
    stredisko char(10),
    id_pracmista integer,
    prac_str char(10),
    zdroj integer,
    por_prihlaseni integer,
    id_hla integer not null,
    id_ne integer not null,
    obdobi_od date,
    obdobi_do date
  );
revoke all on "mzdy".hz_akce_ucast from "public";

create  index "mzdy".ix_hz_akc_uca on "mzdy".hz_akce_ucast (id_pha);
{ TABLE "mzdy".hz_akce_plan row size = 0 number of columns = 29 index size = 0 }
{ unload file name = hz_akce_plan.unl number of rows = 0 }
create table "mzdy".hz_akce_plan 
  (
    id integer not null,
    cislo char(32),
    nazev char(128) not null,
    popis char(250),
    id_typ_akce integer not null,
    id_sablona integer not null,
    obdobi_od date not null,
    obdobi_do date not null,
    termin_od date not null,
    termin_do date not null,
    hodnotitel decimal(10,0),
    hodnotitel_pm integer,
    pozvanka integer,
    zdroj integer,
    zamknuto integer,
    zamek_roz integer,
    prenos_h2m integer,
    obdobi_h2m date,
    koeficient_h2m decimal(6,2),
    zv_kom integer,
    zv_cil integer,
    zv_ncil integer,
    zv_slo integer,
    zv_mot integer,
    zv_roz integer,
    zv_sko integer,
    portal integer,
    konec_cyklu integer,
    kumulace char(16)
  );
revoke all on "mzdy".hz_akce_plan from "public";

{ TABLE "mzdy".hz_akce_neucast row size = 0 number of columns = 13 index size = 0 }
{ unload file name = hz_akce_neucast.unl number of rows = 0 }
create table "mzdy".hz_akce_neucast 
  (
    id integer not null,
    os_cislo decimal(10,0),
    cislo_pom integer not null,
    stredisko char(10),
    prac_str char(10),
    id_pracmista integer,
    prac_kateg integer,
    platnost_od date,
    platnost_do date,
    obdobi_od date,
    obdobi_do date,
    zamek integer,
    synchro char(1)
  );
revoke all on "mzdy".hz_akce_neucast from "public";

{ TABLE "mzdy".hz_cis_krivek row size = 0 number of columns = 5 index size = 0 }
{ unload file name = hz_cis_krivek.unl number of rows = 0 }
create table "mzdy".hz_cis_krivek 
  (
    id integer not null,
    cislo integer,
    nazev char(64) not null,
    popis char(250),
    typ integer not null
  );
revoke all on "mzdy".hz_cis_krivek from "public";

{ TABLE "mzdy".hz_cis_kumulaci row size = 0 number of columns = 2 index size = 0 }
{ unload file name = hz_cis_kumulaci.unl number of rows = 0 }
create table "mzdy".hz_cis_kumulaci 
  (
    kod char(16) not null,
    popis char(64)
  );
revoke all on "mzdy".hz_cis_kumulaci from "public";

{ TABLE "mzdy".hz_akce_parametry row size = 0 number of columns = 7 index size = 0 }
{ unload file name = hz_akce_parametry.unl number of rows = 0 }
create table "mzdy".hz_akce_parametry 
  (
    id integer not null,
    id_pha integer,
    polozka char(24) not null,
    hodnota char(120) not null,
    plati_od date,
    plati_do date,
    datum date
  );
revoke all on "mzdy".hz_akce_parametry from "public";

create  index "mzdy".ix_hz_akc_par on "mzdy".hz_akce_parametry (id_pha);
{ TABLE "mzdy".hz3_irp row size = 0 number of columns = 9 index size = 0 }
{ unload file name = hz3_irp.unl number of rows = 0 }
create table "mzdy".hz3_irp 
  (
    id integer not null,
    idp integer,
    cil integer,
    cil_text char(255),
    zpusob integer,
    rlz char(1),
    ind integer,
    termin date,
    datum date not null
  );
revoke all on "mzdy".hz3_irp from "public";

create  index "mzdy".ix_hz3_irp on "mzdy".hz3_irp (idp);
{ TABLE "mzdy".hz3_hodnoceni row size = 0 number of columns = 26 index size = 0 }
{ unload file name = hz3_hodnoceni.unl number of rows = 0 }
create table "mzdy".hz3_hodnoceni 
  (
    id integer not null,
    typ_hodn char(1) not null,
    akce integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    id_pracmista integer,
    datum date,
    vyhod decimal(10,0),
    schvalil decimal(10,0),
    obeznamen char(1) not null,
    dat_obezn date,
    souhlas char(1) not null,
    ukonceno char(1) not null,
    zamek integer,
    zamknuto char(1) not null,
    dat_zamek date,
    id_pozn integer,
    id_silne integer,
    id_zlepseni integer,
    id_zajmy integer,
    id_zhodnoceni integer,
    id_zamestnanec integer,
    vyp_hodn decimal(5,2),
    poznamka char(255),
    portal integer,
    obdobi date not null
  );
revoke all on "mzdy".hz3_hodnoceni from "public";

create  index "mzdy".x_hz3_hodn on "mzdy".hz3_hodnoceni (os_cislo, cislo_pom);
{ TABLE "mzdy".hz3_hod_vahy row size = 0 number of columns = 3 index size = 0 }
{ unload file name = hz3_hod_vahy.unl number of rows = 0 }
create table "mzdy".hz3_hod_vahy 
  (
    funkce char(8) not null,
    vaha integer not null,
    kriter integer
  );
revoke all on "mzdy".hz3_hod_vahy from "public";

{ TABLE "mzdy".hz3_hfirmy row size = 0 number of columns = 8 index size = 0 }
{ unload file name = hz3_hfirmy.unl number of rows = 0 }
create table "mzdy".hz3_hfirmy 
  (
    id integer not null,
    idp integer,
    hf integer not null,
    hf_popis char(250),
    model integer,
    vaha integer,
    hodnoceni decimal(10,2),
    datum date not null
  );
revoke all on "mzdy".hz3_hfirmy from "public";

{ TABLE "mzdy".hz3_hf row size = 0 number of columns = 8 index size = 0 }
{ unload file name = hz3_hf.unl number of rows = 0 }
create table "mzdy".hz3_hf 
  (
    id integer not null,
    idp integer,
    hf integer not null,
    hf_text char(250),
    model integer,
    vaha integer,
    hodnoceni decimal(10,2),
    datum date not null
  );
revoke all on "mzdy".hz3_hf from "public";

create  index "mzdy".ix_hz3_hf on "mzdy".hz3_hf (idp);
{ TABLE "mzdy".hz3_cis_stupne row size = 0 number of columns = 7 index size = 0 }
{ unload file name = hz3_cis_stupne.unl number of rows = 0 }
create table "mzdy".hz3_cis_stupne 
  (
    id integer not null,
    stupen integer not null,
    popis char(255) not null,
    typ char(2) not null,
    platnost_od date,
    platnost_do date,
    id_blob integer
  );
revoke all on "mzdy".hz3_cis_stupne from "public";

create  index "mzdy".ix_hz3_cis_st on "mzdy".hz3_cis_stupne (typ, stupen);
{ TABLE "mzdy".hz3_cis_nabidky row size = 0 number of columns = 7 index size = 0 }
{ unload file name = hz3_cis_nabidky.unl number of rows = 0 }
create table "mzdy".hz3_cis_nabidky 
  (
    id integer not null,
    cislo integer not null,
    popis char(255) not null,
    typ char(2) not null,
    platnost_od date,
    platnost_do date,
    id_blob integer
  );
revoke all on "mzdy".hz3_cis_nabidky from "public";

create  index "mzdy".ix_hz3_cis_nab on "mzdy".hz3_cis_nabidky (typ, cislo);
{ TABLE "mzdy".hz3_cis_akce row size = 0 number of columns = 7 index size = 0 }
{ unload file name = hz3_cis_akce.unl number of rows = 0 }
create table "mzdy".hz3_cis_akce 
  (
    id integer not null,
    cislo integer not null,
    popis char(50) not null,
    portal integer not null,
    zamek_akce integer not null,
    datum_ukonceni date,
    datum date
  );
revoke all on "mzdy".hz3_cis_akce from "public";

create  index "mzdy".x_hz3_cisakce on "mzdy".hz3_cis_akce (cislo);
{ TABLE "mzdy".hz3_cile row size = 0 number of columns = 9 index size = 0 }
{ unload file name = hz3_cile.unl number of rows = 0 }
create table "mzdy".hz3_cile 
  (
    id integer not null,
    idp integer,
    skupina integer,
    cil integer not null,
    cil_text char(250),
    vaha integer,
    hodnoceni decimal(10,2),
    vypocet integer,
    datum date not null
  );
revoke all on "mzdy".hz3_cile from "public";

create  index "mzdy".ix_hz3_cile on "mzdy".hz3_cile (idp);
{ TABLE "mzdy".hz3_akce row size = 0 number of columns = 7 index size = 0 }
{ unload file name = hz3_akce.unl number of rows = 0 }
create table "mzdy".hz3_akce 
  (
    id integer not null,
    cislo integer not null,
    popis char(50) not null,
    portal integer not null,
    zamek_akce integer not null,
    datum_ukonceni date,
    datum date
  );
revoke all on "mzdy".hz3_akce from "public";

create  index "mzdy".x_hz3_akce on "mzdy".hz3_akce (cislo);
{ TABLE "mzdy".hz3_motivace row size = 0 number of columns = 9 index size = 0 }
{ unload file name = hz3_motivace.unl number of rows = 0 }
create table "mzdy".hz3_motivace 
  (
    id integer not null,
    idp integer,
    cislo integer,
    pozadavek char(255),
    result integer,
    duvod char(255),
    prac_mist char(12),
    termin date,
    datum date not null
  );
revoke all on "mzdy".hz3_motivace from "public";

create  index "mzdy".ix_hz3_motiv on "mzdy".hz3_motivace (idp);
{ TABLE "mzdy".hz3_kompetence row size = 0 number of columns = 8 index size = 0 }
{ unload file name = hz3_kompetence.unl number of rows = 0 }
create table "mzdy".hz3_kompetence 
  (
    id integer not null,
    idp integer not null,
    vlastnost char(7) not null,
    vlastnost_text char(250),
    pozadavek decimal(10,2),
    hodnoceni decimal(10,2),
    vypocet integer,
    datum date not null
  );
revoke all on "mzdy".hz3_kompetence from "public";

create  index "mzdy".ix_kom on "mzdy".hz3_kompetence (idp, id);
{ TABLE "mzdy".hz_cis_stupne row size = 0 number of columns = 4 index size = 0 }
{ unload file name = hz_cis_stupne.unl number of rows = 0 }
create table "mzdy".hz_cis_stupne 
  (
    id integer not null,
    cislo char(7) not null,
    vyznam char(120),
    pouzivano integer not null
  );
revoke all on "mzdy".hz_cis_stupne from "public";

create  index "mzdy".ix_hz_cis_stupne on "mzdy".hz_cis_stupne (cislo);
{ TABLE "mzdy".hz_cis_slovni row size = 0 number of columns = 4 index size = 0 }
{ unload file name = hz_cis_slovni.unl number of rows = 0 }
create table "mzdy".hz_cis_slovni 
  (
    cislo integer not null,
    vyznam char(128),
    popis char(250),
    typ_pozadavku integer
  );
revoke all on "mzdy".hz_cis_slovni from "public";

{ TABLE "mzdy".hz_cis_sku_cilu row size = 0 number of columns = 6 index size = 0 }
{ unload file name = hz_cis_sku_cilu.unl number of rows = 0 }
create table "mzdy".hz_cis_sku_cilu 
  (
    id integer not null,
    nazev char(64) not null,
    popis char(250),
    d_limit integer,
    a_limit integer,
    h_limit integer
  );
revoke all on "mzdy".hz_cis_sku_cilu from "public";

{ TABLE "mzdy".hz_cis_pozadavky row size = 0 number of columns = 4 index size = 0 }
{ unload file name = hz_cis_pozadavky.unl number of rows = 0 }
create table "mzdy".hz_cis_pozadavky 
  (
    cislo char(7) not null,
    vyznam char(120),
    popis char(250),
    typ_pozadavku integer
  );
revoke all on "mzdy".hz_cis_pozadavky from "public";

{ TABLE "mzdy".hz_cis_oblasti row size = 0 number of columns = 2 index size = 0 }
{ unload file name = hz_cis_oblasti.unl number of rows = 0 }
create table "mzdy".hz_cis_oblasti 
  (
    id integer not null,
    oblast char(64) not null
  );
revoke all on "mzdy".hz_cis_oblasti from "public";

{ TABLE "mzdy".hz_cis_motivace row size = 0 number of columns = 4 index size = 0 }
{ unload file name = hz_cis_motivace.unl number of rows = 0 }
create table "mzdy".hz_cis_motivace 
  (
    cislo integer not null,
    vyznam char(128),
    popis char(250),
    typ_pozadavku integer
  );
revoke all on "mzdy".hz_cis_motivace from "public";

{ TABLE "mzdy".html row size = 0 number of columns = 13 index size = 0 }
{ unload file name = html.unl number of rows = 0 }
create table "mzdy".html 
  (
    zahlavi char(500),
    zapati char(500),
    cesta char(150),
    obrazek char(30),
    pozadi char(6),
    pismo char(6),
    stylesheet char(1),
    wrap char(1),
    tablewidth char(6),
    borderwidth char(2),
    cellpadding char(2),
    cellspacing char(2),
    datum char(1)
  );
revoke all on "mzdy".html from "public";

{ TABLE "mzdy".hrp_buff row size = 0 number of columns = 18 index size = 0 }
{ unload file name = hrp_buff.unl number of rows = 0 }
create table "mzdy".hrp_buff 
  (
    id_uziv integer,
    kod integer,
    kod_uzi integer,
    c_dokladu integer,
    castka decimal(16,2),
    cislo_platby char(20),
    cislo_banky char(4),
    var_symb char(10),
    konst_symb char(4),
    spec_symb char(10),
    swift char(11),
    iban char(28),
    os_cislo decimal(10,0),
    cislo_pom integer,
    stred char(10),
    pobocka integer,
    z_uctu integer,
    id_podniku integer not null
  );
revoke all on "mzdy".hrp_buff from "public";

{ TABLE "mzdy".hr_tisk_sestavy row size = 0 number of columns = 7 index size = 0 }
{ unload file name = hr_tisk_sestavy.unl number of rows = 16 }
create table "mzdy".hr_tisk_sestavy 
  (
    id_sestavy integer not null,
    cislo_sestavy char(6),
    nazev_nastaveni char(50),
    zalozil char(24),
    zalozil_kdy date,
    zmenil char(24),
    zmenil_kdy date
  );
revoke all on "mzdy".hr_tisk_sestavy from "public";

{ TABLE "mzdy".hr_tisk_nastav row size = 0 number of columns = 4 index size = 0 }
{ unload file name = hr_tisk_nastav.unl number of rows = 0 }
create table "mzdy".hr_tisk_nastav 
  (
    id_sestavy integer not null,
    polozka char(40) not null,
    radek integer not null,
    nastaveni char(50)
  );
revoke all on "mzdy".hr_tisk_nastav from "public";

{ TABLE "mzdy".hr_pruchody row size = 0 number of columns = 10 index size = 0 }
{ unload file name = hr_pruchody.unl number of rows = 0 }
create table "mzdy".hr_pruchody 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    datum_cas char(17) not null,
    typ_pruchodu char(20) not null,
    dch_kod integer not null,
    par1 char(50),
    par2 char(50),
    dochazka char(10) not null,
    datum_cas_zapisu char(17) not null
  );
revoke all on "mzdy".hr_pruchody from "public";

create  index "mzdy".ix_hrp on "mzdy".hr_pruchody (os_cislo, cislo_pom, datum_cas, typ_pruchodu);
create  index "mzdy".ix_hrp2 on "mzdy".hr_pruchody (datum_cas, dochazka);
create  index "mzdy".ix_hrp3 on "mzdy".hr_pruchody (dch_kod);
{ TABLE "mzdy".hod_zakazek row size = 0 number of columns = 5 index size = 0 }
{ unload file name = hod_zakazek.unl number of rows = 0 }
create table "mzdy".hod_zakazek 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    zakazka char(10),
    hodiny decimal(5,2),
    datum date
  );
revoke all on "mzdy".hod_zakazek from "public";

create  index "mzdy".idx_hod_zakazek on "mzdy".hod_zakazek (os_cislo);
{ TABLE "mzdy".hod_vahy row size = 0 number of columns = 3 index size = 0 }
{ unload file name = hod_vahy.unl number of rows = 0 }
create table "mzdy".hod_vahy 
  (
    funkce char(8) not null,
    vaha integer not null,
    kriter integer
  );
revoke all on "mzdy".hod_vahy from "public";

{ TABLE "mzdy".hod_ot row size = 0 number of columns = 5 index size = 0 }
{ unload file name = hod_ot.unl number of rows = 0 }
create table "mzdy".hod_ot 
  (
    os_cislo decimal(10,0) not null,
    cis_pom integer not null,
    cislo integer not null,
    ot integer not null,
    hodn integer not null
  );
revoke all on "mzdy".hod_ot from "public";

{ TABLE "mzdy".hod_krit row size = 0 number of columns = 14 index size = 0 }
{ unload file name = hod_krit.unl number of rows = 0 }
create table "mzdy".hod_krit 
  (
    cislo integer not null,
    nazev char(60) not null,
    zkr_nazev char(5),
    oblast char(30),
    meritko char(50),
    vaha integer,
    popis char(250),
    id_blobu integer,
    id_pracmist integer,
    id_krivky integer,
    str char(10),
    typ_cilu integer,
    pouzivano char(1),
    kumulace char(16)
  );
revoke all on "mzdy".hod_krit from "public";

create unique  index "mzdy".ix_cislo on "mzdy".hod_krit (cislo);
{ TABLE "mzdy".gs_polozky row size = 0 number of columns = 13 index size = 0 }
{ unload file name = gs_polozky.unl number of rows = 252 }
create table "mzdy".gs_polozky 
  (
    id_hlavicky integer not null,
    polozka char(30) not null,
    poradi integer not null,
    popisek char(50) not null,
    sumovat char(1),
    kody integer,
    obdobi char(1),
    stred_col integer,
    zarovnani integer,
    sirka integer,
    ciselnik char(40),
    skupina integer,
    format char(15)
  );
revoke all on "mzdy".gs_polozky from "public";

create  index "mzdy".ix_gs_pol on "mzdy".gs_polozky (id_hlavicky, polozka);
{ TABLE "mzdy".gs_hlavicky row size = 0 number of columns = 10 index size = 0 }
{ unload file name = gs_hlavicky.unl number of rows = 22 }
create table "mzdy".gs_hlavicky 
  (
    id integer not null,
    nazev char(30) not null,
    nadpis char(150),
    varianta integer not null,
    id_sql integer,
    filtr char(400),
    potl_zam integer,
    uzivatel char(64) not null,
    datum date not null,
    cas char(6) not null
  );
revoke all on "mzdy".gs_hlavicky from "public";

{ TABLE "mzdy".funkce row size = 0 number of columns = 2 index size = 0 }
{ unload file name = funkce.unl number of rows = 0 }
create table "mzdy".funkce 
  (
    cislo char(5) not null,
    nazev char(60) not null
  );
revoke all on "mzdy".funkce from "public";

{ TABLE "mzdy".funk_zkr row size = 0 number of columns = 2 index size = 0 }
{ unload file name = funk_zkr.unl number of rows = 0 }
create table "mzdy".funk_zkr 
  (
    cislo char(5) not null,
    nazev char(60)
  );
revoke all on "mzdy".funk_zkr from "public";

{ TABLE "mzdy".funk_kzam row size = 0 number of columns = 2 index size = 0 }
{ unload file name = funk_kzam.unl number of rows = 0 }
create table "mzdy".funk_kzam 
  (
    kzam integer not null,
    funkce2 char(4) not null
  );
revoke all on "mzdy".funk_kzam from "public";

{ TABLE "mzdy".funk row size = 0 number of columns = 2 index size = 0 }
{ unload file name = funk.unl number of rows = 46 }
create table "mzdy".funk 
  (
    funkce char(12),
    nazev char(120)
  );
revoke all on "mzdy".funk from "public";

{ TABLE "mzdy".fotografie row size = 0 number of columns = 2 index size = 0 }
{ unload file name = fotografie.unl number of rows = 0 }
create table "mzdy".fotografie 
  (
    os_cislo decimal(10,0) not null,
    foto byte
  );
revoke all on "mzdy".fotografie from "public";

{ TABLE "mzdy".fondy row size = 0 number of columns = 4 index size = 0 }
{ unload file name = fondy.unl number of rows = 0 }
create table "mzdy".fondy 
  (
    os_cislo decimal(10,0) not null,
    fond decimal(5,2),
    cislo_pom integer,
    datum date
  );
revoke all on "mzdy".fondy from "public";

create  index "mzdy".idx_fondy on "mzdy".fondy (os_cislo);
{ TABLE "mzdy".fce_ostat2 row size = 0 number of columns = 10 index size = 0 }
{ unload file name = fce_ostat2.unl number of rows = 0 }
create table "mzdy".fce_ostat2 
  (
    funkce char(8) not null,
    org_jedn char(6),
    utvar char(15),
    opravneni char(120),
    podklady char(120),
    kontrolovano char(120),
    vypracoval char(20),
    vyp_dat date,
    schvalil char(20),
    schv_dat date
  );
revoke all on "mzdy".fce_ostat2 from "public";

{ TABLE "mzdy".fce_ostat row size = 0 number of columns = 5 index size = 0 }
{ unload file name = fce_ostat.unl number of rows = 0 }
create table "mzdy".fce_ostat 
  (
    funkce char(8) not null,
    id1 char(7) not null,
    id2 char(7),
    id3 char(7),
    id4 char(60)
  );
revoke all on "mzdy".fce_ostat from "public";

create  index "mzdy".ix_fce_ostat on "mzdy".fce_ostat (funkce, id1);
{ TABLE "mzdy".externi_parametry row size = 0 number of columns = 4 index size = 0 }
{ unload file name = externi_parametry.unl number of rows = 10 }
create table "mzdy".externi_parametry 
  (
    polozka char(32) not null,
    typ char(1) not null,
    hodnota char(64) not null,
    id_podniku integer not null
  );
revoke all on "mzdy".externi_parametry from "public";

{ TABLE "mzdy".externi_pripoj row size = 0 number of columns = 8 index size = 0 }
{ unload file name = externi_pripoj.unl number of rows = 0 }
create table "mzdy".externi_pripoj 
  (
    id_pripojeni integer not null,
    nazev char(100) not null,
    server char(100),
    databaze char(50),
    prihl_jmeno char(50),
    prihl_heslo char(50),
    parametry char(250),
    podminky char(100)
  );
revoke all on "mzdy".externi_pripoj from "public";

{ TABLE "mzdy".eldp_stare_syst_d row size = 0 number of columns = 68 index size = 0 }
{ unload file name = eldp_stare_syst_d.unl number of rows = 0 }
create table "mzdy".eldp_stare_syst_d 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    mez_obd date not null,
    kod char(3) not null,
    dat_od date,
    dat_do date,
    dny1 integer,
    dny2 integer,
    dny3 integer,
    dny4 integer,
    dny5 integer,
    dny6 integer,
    dny7 integer,
    dny8 integer,
    dny9 integer,
    dny10 integer,
    dny11 integer,
    dny12 integer,
    prijmy1 decimal(16,2),
    prijmy2 decimal(16,2),
    prijmy3 decimal(16,2),
    prijmy4 decimal(16,2),
    prijmy5 decimal(16,2),
    prijmy6 decimal(16,2),
    prijmy7 decimal(16,2),
    prijmy8 decimal(16,2),
    prijmy9 decimal(16,2),
    prijmy10 decimal(16,2),
    prijmy11 decimal(16,2),
    prijmy12 decimal(16,2),
    vyl_doby1 integer,
    vyl_doby2 integer,
    vyl_doby3 integer,
    vyl_doby4 integer,
    vyl_doby5 integer,
    vyl_doby6 integer,
    vyl_doby7 integer,
    vyl_doby8 integer,
    vyl_doby9 integer,
    vyl_doby10 integer,
    vyl_doby11 integer,
    vyl_doby12 integer,
    odect_doby1 integer,
    odect_doby2 integer,
    odect_doby3 integer,
    odect_doby4 integer,
    odect_doby5 integer,
    odect_doby6 integer,
    odect_doby7 integer,
    odect_doby8 integer,
    odect_doby9 integer,
    odect_doby10 integer,
    odect_doby11 integer,
    odect_doby12 integer,
    kr1 char(1),
    kr2 char(1),
    kr3 char(1),
    kr4 char(1),
    kr5 char(1),
    kr6 char(1),
    kr7 char(1),
    kr8 char(1),
    kr9 char(1),
    kr10 char(1),
    kr11 char(1),
    kr12 char(1),
    prv_mes_poj date
  );
revoke all on "mzdy".eldp_stare_syst_d from "public";

create  index "mzdy".ix_eldp_st_syst_d on "mzdy".eldp_stare_syst_d (os_cislo, cislo_pom);
{ TABLE "mzdy".eldp_stare_syst row size = 0 number of columns = 24 index size = 0 }
{ unload file name = eldp_stare_syst.unl number of rows = 0 }
create table "mzdy".eldp_stare_syst 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    mez_obd date not null,
    kod char(3) not null,
    dat_od date,
    dat_do date,
    dny integer,
    prijmy decimal(16,2),
    vyl_doby integer,
    odect_doby integer,
    kr1 char(1),
    kr2 char(1),
    kr3 char(1),
    kr4 char(1),
    kr5 char(1),
    kr6 char(1),
    kr7 char(1),
    kr8 char(1),
    kr9 char(1),
    kr10 char(1),
    kr11 char(1),
    kr12 char(1),
    prv_mes_poj date
  );
revoke all on "mzdy".eldp_stare_syst from "public";

create  index "mzdy".ix_eldp_stare_syst on "mzdy".eldp_stare_syst (os_cislo, cislo_pom);
{ TABLE "mzdy".eldp_par row size = 0 number of columns = 14 index size = 0 }
{ unload file name = eldp_par.unl number of rows = 1 }
create table "mzdy".eldp_par 
  (
    kody_umrti char(100),
    dobr_prac char(100),
    nepr_vyp char(100),
    spolecnik char(100),
    clen_druz char(100),
    dom_prac char(100),
    jednatel char(100),
    statutar char(100),
    kod_cvs integer,
    kod_vs integer,
    pobocky_adr char(1),
    pobocky_vs char(1),
    kod_odn_sv integer,
    servis_dat date
  );
revoke all on "mzdy".eldp_par from "public";

{ TABLE "mzdy".eldp_hist row size = 0 number of columns = 10 index size = 0 }
{ unload file name = eldp_hist.unl number of rows = 3846 }
create table "mzdy".eldp_hist 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    id_zazn integer not null,
    cislo_davky integer not null,
    rok integer not null,
    mes_od integer not null,
    mes_do integer not null,
    datum date not null,
    cas char(8) not null,
    uzivatel char(64) not null
  );
revoke all on "mzdy".eldp_hist from "public";

{ TABLE "mzdy".eldp_data_sk row size = 0 number of columns = 12 index size = 0 }
{ unload file name = eldp_data_sk.unl number of rows = 0 }
create table "mzdy".eldp_data_sk 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    rok integer not null,
    rok_poradi integer not null,
    znak char(2),
    den_od integer,
    mes_od integer,
    den_do integer,
    mes_do integer,
    vym_zakl decimal(15,2),
    vym_zakl_vd decimal(15,2),
    vyl_doby integer
  );
revoke all on "mzdy".eldp_data_sk from "public";

{ TABLE "mzdy".eldp_data_sk_ext row size = 0 number of columns = 14 index size = 0 }
{ unload file name = eldp_data_sk_ext.unl number of rows = 0 }
create table "mzdy".eldp_data_sk_ext 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    rok integer not null,
    rok_poradi integer not null,
    znak char(2),
    den_od integer,
    mes_od integer,
    den_do integer,
    mes_do integer,
    vym_zakl decimal(15,2),
    vym_zakl_vd decimal(15,2),
    vyl_doby integer,
    prevedeno char(1) not null,
    id_podniku integer not null
  );
revoke all on "mzdy".eldp_data_sk_ext from "public";

{ TABLE "mzdy".eneschopenka row size = 0 number of columns = 67 index size = 0 }
{ unload file name = eneschopenka.unl number of rows = 0 }
create table "mzdy".eneschopenka 
  (
    id integer not null,
    vs decimal(10,0),
    datumod date,
    datumdo date,
    idnotifikace char(38),
    idpripadu char(38),
    datumvznikunotif date,
    cislorozhodnuti char(18) not null,
    jmeno char(100),
    prijmeni char(100),
    datumnarozeni date,
    rodnecislo char(10) not null,
    nazevzamestnavatel char(150) not null,
    variabilnisymbol char(10) not null,
    koddruhucinnosti char(40) not null,
    nazevdruhucinnosti char(512) not null,
    identifikacnicislo char(35),
    datumneschopenod date,
    nazevpzs char(155),
    jmenolekare char(100),
    icpulice char(100),
    icpcislopopisne char(12),
    icpcisloorientacni char(4),
    icpnazevobce char(100),
    icppostovnismerova char(11),
    icpkodstatu char(2),
    koddruhunemoci char(3),
    pracovniuraz char(1),
    urazjinaosoba char(1),
    alkoholomamnelatky char(1),
    ulice char(100),
    cislopopisne char(12),
    cisloorientacni char(4),
    nazevobce char(100),
    dodatek char(50),
    postovnismerovacic char(11),
    kodstatu char(2),
    datumadresaod date,
    datumadresado date,
    datumvychazkyod date,
    datumvychazkydo date,
    casod char(8),
    casdo char(8),
    typvety char(64) not null,
    datumneschopendo date,
    datumvystavenikedn date,
    os_cislo decimal(10,0),
    cislo_pom integer,
    kod integer,
    c_dokladu integer,
    dat_od date,
    prizn_zprac char(1) not null,
    datum_zprac date,
    cas_zprac char(8),
    obdobi_zprac date,
    zpracoval char(64),
    oh_prvden decimal(4,2),
    oh_poslden decimal(4,2),
    vyradit char(1),
    zpracovat char(1),
    umyslna char(1),
    zpet_dopoc char(1),
    uziv_doklad char(10),
    posl_cast_zprac date,
    zmenaatributu char(250),
    poznamka char(150),
    izolacka char(1)
  );
revoke all on "mzdy".eneschopenka from "public";

create  index "mzdy".x_eneschop on "mzdy".eneschopenka (rodnecislo, cislorozhodnuti, typvety);
{ TABLE "mzdy".eneschopenka_hl row size = 0 number of columns = 4 index size = 0 }
{ unload file name = eneschopenka_hl.unl number of rows = 0 }
create table "mzdy".eneschopenka_hl 
  (
    id integer not null,
    poradi integer not null,
    typ char(1) not null,
    hlaseni char(200) not null
  );
revoke all on "mzdy".eneschopenka_hl from "public";

{ TABLE "mzdy".ednp_zadost_multi row size = 0 number of columns = 12 index size = 0 }
{ unload file name = ednp_zadost_multi.unl number of rows = 0 }
create table "mzdy".ednp_zadost_multi 
  (
    id integer not null,
    id_zadosti integer not null,
    druh char(1) not null,
    id_rod_prisl integer,
    rodne_cislo char(10),
    datum_narozeni date,
    prijmeni char(40),
    jmeno char(40),
    nazev_soubor char(100),
    typ_souboru char(5),
    id_info_blob integer,
    poznamka char(50)
  );
revoke all on "mzdy".ednp_zadost_multi from "public";

{ TABLE "mzdy".ednp_zadost_udaje row size = 0 number of columns = 33 index size = 0 }
{ unload file name = ednp_zadost_udaje.unl number of rows = 0 }
create table "mzdy".ednp_zadost_udaje 
  (
    id_zadost_detail integer not null,
    id_zadosti integer not null,
    poradi integer not null,
    nepritomen_do date,
    akce_vznik char(1),
    akce_trvani char(1),
    akce_ukonceni char(1),
    davka_od date,
    davka_do date,
    vztah_k_osetrovane char(3),
    duvod_osetrovani char(1),
    ic_zarizeni char(8),
    nazev_zarizeni char(100),
    spolecna_domacnost char(1),
    spolecna_kod_vztah integer,
    je_osamely char(1),
    v_peci_dite char(1),
    jinaos_ppm_rp char(1),
    jinaos_ppm_nec_vol char(1),
    jinaos_ppm_nemoc char(1),
    pecoval_celoudobu char(1),
    stridani char(1),
    duvod_pece_ppm char(1),
    dat_predp_porodu date,
    hospital_dite char(1),
    duvod_otcovske char(1),
    zdroj char(1),
    vyplneno_dne date,
    obdobi date,
    zpracovano char(1),
    zprac_datum date,
    zprac_cas char(8),
    zprac_uzivatel char(64)
  );
revoke all on "mzdy".ednp_zadost_udaje from "public";

{ TABLE "mzdy".ednp_zadost_pece row size = 0 number of columns = 4 index size = 0 }
{ unload file name = ednp_zadost_pece.unl number of rows = 0 }
create table "mzdy".ednp_zadost_pece 
  (
    id integer not null,
    id_zadost_detail integer not null,
    pece_od date,
    pece_do date
  );
revoke all on "mzdy".ednp_zadost_pece from "public";

{ TABLE "mzdy".ednp_zadost row size = 0 number of columns = 15 index size = 0 }
{ unload file name = ednp_zadost.unl number of rows = 0 }
create table "mzdy".ednp_zadost 
  (
    id_zadosti integer not null,
    varsymb_podniku char(20),
    os_cislo decimal(10,0),
    cislo_rozhodnuti char(20),
    druh char(3),
    id_rod_prisl integer,
    rodne_cislo char(10),
    datum_narozeni date,
    prijmeni char(40),
    jmeno char(40),
    nepritomen_od date,
    pozdeji char(1),
    sluzebni char(1),
    poznamka char(50),
    porizeno char(19)
  );
revoke all on "mzdy".ednp_zadost from "public";

create unique  index "mzdy".ix_edpn_zad_4p on "mzdy".ednp_zadost (os_cislo, druh, nepritomen_od, cislo_rozhodnuti);
create  index "mzdy".ix_edpn_zad_cr on "mzdy".ednp_zadost (cislo_rozhodnuti);
{ TABLE "mzdy".ednp_zadost_kontr row size = 0 number of columns = 14 index size = 0 }
{ unload file name = ednp_zadost_kontr.unl number of rows = 0 }
create table "mzdy".ednp_zadost_kontr 
  (
    typ_uzivatele char(1) not null,
    kontrola_skupina char(1) not null,
    zadost_tab char(1) not null,
    zadost_id integer not null,
    odpoved_tab char(1),
    odpoved_id integer,
    kontrola_druh char(3) not null,
    kontrola_kod char(3) not null,
    kontrola_text char(170),
    uzivatel char(64),
    datum date,
    cas char(8),
    obdobi date,
    poznamka char(10)
  );
revoke all on "mzdy".ednp_zadost_kontr from "public";

create  index "mzdy".ix_ednp_zad_kontr1 on "mzdy".ednp_zadost_kontr (zadost_tab, zadost_id, typ_uzivatele, kontrola_skupina);
{ TABLE "mzdy".e_param row size = 0 number of columns = 9 index size = 0 }
{ unload file name = e_param.unl number of rows = 1596 }
create table "mzdy".e_param 
  (
    polozka char(15) not null,
    hodnota char(255),
    plati_od date,
    plati_do date,
    uzivatel char(64),
    datum date,
    syskod integer,
    skupina decimal(7,2),
    id_podniku integer
  );
revoke all on "mzdy".e_param from "public";

create  index "mzdy".e_param2 on "mzdy".e_param (uzivatel);
create  index "mzdy".ix_e_param on "mzdy".e_param (skupina, polozka);
create  index "mzdy".ix_e_param1 on "mzdy".e_param (polozka, hodnota);
create  index "mzdy".ix_e_param3 on "mzdy".e_param (syskod);
{ TABLE "mzdy".ednp_historie_xml row size = 0 number of columns = 17 index size = 0 }
{ unload file name = ednp_historie_xml.unl number of rows = 66 }
create table "mzdy".ednp_historie_xml 
  (
    id integer not null,
    os_cislo decimal(10,0),
    cislo_pom integer,
    id_podani char(32),
    typ char(8) not null,
    podtyp char(8),
    udalost char(1) not null,
    cislo_rozhodnuti char(20),
    id_zadosti integer,
    id_zadost_detail integer,
    id_certifikatu integer,
    kod integer,
    c_dokladu integer,
    uzivatel char(64),
    obdobi date,
    datum date,
    cas char(8)
  );
revoke all on "mzdy".ednp_historie_xml from "public";

create  index "mzdy".ix_ednp_hx_1 on "mzdy".ednp_historie_xml (id_podani);
{ TABLE "mzdy".ednp_odpoved row size = 0 number of columns = 13 index size = 0 }
{ unload file name = ednp_odpoved.unl number of rows = 0 }
create table "mzdy".ednp_odpoved 
  (
    id_odpovedi integer not null,
    varsymb_podniku char(20),
    cislo_rozhodnuti char(20),
    status_kod char(5),
    status_popis char(200),
    typ_podani char(15),
    id_podani char(36),
    opravne char(1),
    datum_vystaveni date,
    datum_prijeti char(26),
    zpracovano integer not null,
    id_podani_nase char(32),
    zapsano char(23)
  );
revoke all on "mzdy".ednp_odpoved from "public";

create  index "mzdy".ix_edpn_odp_cr on "mzdy".ednp_odpoved (cislo_rozhodnuti);
create  index "mzdy".ix_edpn_odp_uuid on "mzdy".ednp_odpoved (id_podani);
{ TABLE "mzdy".ednp_odpoved_data row size = 0 number of columns = 4 index size = 0 }
{ unload file name = ednp_odpoved_data.unl number of rows = 0 }
create table "mzdy".ednp_odpoved_data 
  (
    id integer not null,
    id_odpovedi integer not null,
    polozka char(50) not null,
    hodnota char(200)
  );
revoke all on "mzdy".ednp_odpoved_data from "public";

create  index "mzdy".ix_edpn_odp_d1 on "mzdy".ednp_odpoved_data (id_odpovedi);
{ TABLE "mzdy".druh_pom_j row size = 0 number of columns = 5 index size = 0 }
{ unload file name = druh_pom_j.unl number of rows = 0 }
create table "mzdy".druh_pom_j 
  (
    os_cislo decimal(10,0) not null,
    druh_pom_j char(2) not null,
    cislo_pom integer,
    zk_doba date,
    kl_po_zam char(4)
  );
revoke all on "mzdy".druh_pom_j from "public";

{ TABLE "mzdy".drobn_por row size = 0 number of columns = 13 index size = 0 }
{ unload file name = drobn_por.unl number of rows = 0 }
create table "mzdy".drobn_por 
  (
    os_cislo decimal(10,0) not null,
    c_dokladu integer not null,
    datum date,
    hodina decimal(4,2),
    cast_tela char(50),
    popis char(250),
    ciz_zav char(1) not null,
    kym char(50),
    svedek char(50),
    misto char(50),
    souv_prace char(1) not null,
    osetreni char(1) not null,
    cis_on char(6)
  );
revoke all on "mzdy".drobn_por from "public";

create  index "mzdy".ix_drob on "mzdy".drobn_por (os_cislo);
create  index "mzdy".ix_drob_cd on "mzdy".drobn_por (datum);
{ TABLE "mzdy".dr_proh_nadrizene row size = 0 number of columns = 2 index size = 0 }
{ unload file name = dr_proh_nadrizene.unl number of rows = 0 }
create table "mzdy".dr_proh_nadrizene 
  (
    cislop integer not null,
    cislon integer not null
  );
revoke all on "mzdy".dr_proh_nadrizene from "public";

create  index "mzdy".ix_dr_proh_n on "mzdy".dr_proh_nadrizene (cislop);
{ TABLE "mzdy".dr_proh row size = 0 number of columns = 24 index size = 0 }
{ unload file name = dr_proh.unl number of rows = 5 }
create table "mzdy".dr_proh 
  (
    cislo integer not null,
    nazev char(40) not null,
    cetnost_start integer,
    cetnost integer,
    vek_od integer,
    vekm_od integer,
    vek_do integer,
    vekm_do integer,
    sku_proh integer,
    vyj_cet char(1),
    castka decimal(16,2),
    platce integer,
    lekar integer,
    pr_misto char(1),
    nadrizena integer,
    predch integer,
    riziko char(12),
    riziko_faktor char(7),
    vstup char(1) not null,
    platnost_od date,
    platnost_do date,
    opakovat integer,
    poznamka char(250),
    pouzivano char(1)
  );
revoke all on "mzdy".dr_proh from "public";

create unique  index "mzdy".ix_dr_proh on "mzdy".dr_proh (cislo);
{ TABLE "mzdy".dph row size = 0 number of columns = 5 index size = 0 }
{ unload file name = dph.unl number of rows = 5 }
create table "mzdy".dph 
  (
    kod char(3) not null,
    nazev char(30) not null,
    sazba decimal(4,2) not null,
    plati_od date not null,
    plati_do date
  );
revoke all on "mzdy".dph from "public";

{ TABLE "mzdy".dr_proh_periody row size = 0 number of columns = 5 index size = 0 }
{ unload file name = dr_proh_periody.unl number of rows = 0 }
create table "mzdy".dr_proh_periody 
  (
    id integer not null,
    cislop integer not null,
    cetnost integer not null,
    platnost_od date,
    platnost_do date
  );
revoke all on "mzdy".dr_proh_periody from "public";

create  index "mzdy".ix_dr_proh_p on "mzdy".dr_proh_periody (cislop, platnost_do);
{ TABLE "mzdy".duvody_cisel row size = 0 number of columns = 5 index size = 0 }
{ unload file name = duvody_cisel.unl number of rows = 0 }
create table "mzdy".duvody_cisel 
  (
    poradi integer not null,
    kod char(20),
    udalost char(32),
    popis char(150),
    skupina integer
  );
revoke all on "mzdy".duvody_cisel from "public";

create unique  index "mzdy".ix_duvody_cisel1 on "mzdy".duvody_cisel (poradi, kod);
{ TABLE "mzdy".duvody_nastav row size = 0 number of columns = 10 index size = 0 }
{ unload file name = duvody_nastav.unl number of rows = 0 }
create table "mzdy".duvody_nastav 
  (
    druh_zmeny char(1) not null,
    tabulka char(18) not null,
    sloupec char(18),
    duvod1 integer not null,
    filtr_skupin1 char(50),
    duvod2 integer not null,
    filtr_skupin2 char(50),
    datum_platnosti integer not null,
    popis_duvodu1 integer not null,
    podminka_drpomj char(20)
  );
revoke all on "mzdy".duvody_nastav from "public";

create unique  index "mzdy".ix_duvody_nastav1 on "mzdy".duvody_nastav (druh_zmeny, tabulka, sloupec);
{ TABLE "mzdy".duvody_zmen row size = 0 number of columns = 4 index size = 0 }
{ unload file name = duvody_zmen.unl number of rows = 0 }
create table "mzdy".duvody_zmen 
  (
    id_dbarch integer not null,
    duvod1 char(20),
    duvod2 char(20),
    datum_platnosti date
  );
revoke all on "mzdy".duvody_zmen from "public";

create unique  index "mzdy".ix_duvody_zmen1 on "mzdy".duvody_zmen (id_dbarch);
{ TABLE "mzdy".dr_proh_poc_int row size = 0 number of columns = 4 index size = 0 }
{ unload file name = dr_proh_poc_int.unl number of rows = 0 }
create table "mzdy".dr_proh_poc_int 
  (
    id integer not null,
    cislop integer not null,
    cisloi integer not null,
    cetnost integer not null
  );
revoke all on "mzdy".dr_proh_poc_int from "public";

create  index "mzdy".ix_dr_proh_p_i on "mzdy".dr_proh_poc_int (cislop, cisloi);
{ TABLE "mzdy".dovolena21 row size = 0 number of columns = 50 index size = 0 }
{ unload file name = dovolena21.unl number of rows = 12945 }
create table "mzdy".dovolena21 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    cislo_pom_pred integer,
    dov21_hod char(1) not null,
    kal_dny integer not null,
    tpd decimal(5,2) not null,
    prum_tpd decimal(5,2) not null,
    zap_hod decimal(6,2) not null,
    zap_hod_akt decimal(5,2),
    cast_zap_hod decimal(6,2) not null,
    cast_zap_hod_akt decimal(5,2),
    odprac_hod decimal(6,2) not null,
    odprac_hod_akt decimal(5,2),
    fond_plan decimal(6,2) not null,
    cast_zap_plan decimal(6,2) not null,
    zap_tyd decimal(8,5) not null,
    zap_tyd_akt decimal(8,5),
    cast_zap_tyd decimal(8,5) not null,
    cast_zap_tyd_akt decimal(8,5),
    odprac_tyd decimal(8,5) not null,
    odprac_tyd_akt decimal(8,5),
    krac_hod decimal(6,2) not null,
    krac_hod_akt decimal(5,2),
    krac_dny decimal(5,2) not null,
    krac_dny_akt decimal(5,2),
    vymera decimal(3,1) not null,
    vymera_navys decimal(3,1) not null,
    narok_letos decimal(6,2) not null,
    narok_navys decimal(6,2) not null,
    narok_konst decimal(6,2) not null,
    zust_minul decimal(6,2) not null,
    zust_min_zam decimal(6,2) not null,
    dodatkova_riziko decimal(6,2) not null,
    dodatkova_podzem decimal(6,2) not null,
    dodatkova_tropy decimal(6,2) not null,
    cerpana decimal(6,2) not null,
    cerpana_akt decimal(5,2),
    cerpana_sone decimal(6,2),
    cerpana_sone_akt decimal(5,2),
    kracena decimal(6,2) not null,
    zustatek decimal(6,2) not null,
    zust_minul_dny decimal(4,1) not null,
    cerp_dny decimal(3,1) not null,
    cerp_dny_akt decimal(3,1),
    zust_dny decimal(4,1) not null,
    aut_vymera char(1) not null,
    aut_odprac char(1),
    aut_kratit char(1),
    dov_ost_pp char(1),
    datum date not null
  );
revoke all on "mzdy".dovolena21 from "public";

create  index "mzdy".ix_dov21_1 on "mzdy".dovolena21 (os_cislo, cislo_pom);
create  index "mzdy".ix_dov21_2 on "mzdy".dovolena21 (dov21_hod);
{ TABLE "mzdy".dovolena row size = 0 number of columns = 37 index size = 0 }
{ unload file name = dovolena.unl number of rows = 74644 }
create table "mzdy".dovolena 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    kal_dny integer not null,
    kal_dny_akt integer,
    kal_dny_plan integer not null,
    fond_dny integer not null,
    fond_dny_akt integer,
    fond_dny_plan integer not null,
    koef decimal(4,3),
    odprac_dny integer not null,
    odprac_dny_akt integer,
    odprac_dny_plan integer not null,
    odpr_dny_dod integer,
    odpr_dny_dod_akt integer,
    neodprac_dny integer not null,
    neodprac_dny_akt integer,
    narok_zakl decimal(3,1),
    narok_letos decimal(5,2) not null,
    zust_minul decimal(5,2) not null,
    zust_predminul decimal(5,2) not null,
    cerpana decimal(5,2) not null,
    cerpana_akt decimal(5,2),
    kracena decimal(5,2) not null,
    dodatkova_rocni decimal(5,2),
    dodatkova decimal(5,2) not null,
    zustatek decimal(5,2),
    aut_narok char(1),
    aut_kratit char(1),
    navaz_dov char(1),
    ext_dov char(1),
    narok_roz char(1),
    dodatkova_pln char(1),
    dov_ml char(1),
    dov_ml_dny integer,
    cerpana_sone decimal(5,2),
    cerpana_sone_akt decimal(5,2),
    datum date not null
  );
revoke all on "mzdy".dovolena from "public";

create  index "mzdy".ix_dov on "mzdy".dovolena (os_cislo);
create  index "mzdy".ix_dov2 on "mzdy".dovolena (os_cislo, cislo_pom);
create unique  index "mzdy".ix_dov3 on "mzdy".dovolena (os_cislo, cislo_pom, datum);
{ TABLE "mzdy".e_par_skup row size = 0 number of columns = 2 index size = 0 }
{ unload file name = e_par_skup.unl number of rows = 1 }
create table "mzdy".e_par_skup 
  (
    ids integer,
    popis char(75)
  );
revoke all on "mzdy".e_par_skup from "public";

create  index "mzdy".ix_e_pars on "mzdy".e_par_skup (ids);
{ TABLE "mzdy".dok_zopse_hist row size = 0 number of columns = 37 index size = 0 }
{ unload file name = dok_zopse_hist.unl number of rows = 0 }
create table "mzdy".dok_zopse_hist 
  (
    id integer not null,
    uzivatel char(64),
    cislo_jednaci char(64),
    zamestnavatel char(40),
    zam_adresa1 char(64),
    zam_adresa2 char(64),
    zam_ico char(8),
    cislo_rozhodnuti char(20),
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    druh_pom char(60),
    jmeno char(128),
    adresa char(64),
    rodne_cislo char(50),
    datum_nastupu char(16),
    datum_vystupu char(16),
    exekutorsky_urad char(64),
    exe_adresa1 char(64),
    exe_adresa2 char(64),
    exe_email char(64),
    prednostni char(1),
    nab_pr_moci date,
    za_obdobi char(16),
    dluh integer,
    pr_hr_mes_prijem integer,
    banka char(32),
    kontaktni_osoba_1 char(32),
    kontaktni_osoba_2 char(32),
    kontaktni_osoba_3 char(32),
    kontaktni_telefon char(16),
    kontaktni_email char(64),
    ve char(64),
    dne char(10),
    podpis char(64),
    datum date,
    cas char(8),
    poznamka char(250)
  );
revoke all on "mzdy".dok_zopse_hist from "public";

create  index "mzdy".zopse_hist_ix on "mzdy".dok_zopse_hist (uzivatel, id);
{ TABLE "mzdy".dok_prijate row size = 0 number of columns = 14 index size = 0 }
{ unload file name = dok_prijate.unl number of rows = 0 }
create table "mzdy".dok_prijate 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    typ_dokumentu char(7) not null,
    datum_prijeti date,
    prijal char(32),
    datum_vystaveni date,
    vystavil char(50),
    cesta_soubor char(200),
    nazev_soubor char(100),
    poznamka char(50),
    sdilene_uloziste char(150),
    id_blob integer,
    portal char(1),
    id_externi_vazby integer
  );
revoke all on "mzdy".dok_prijate from "public";

create  index "mzdy".ix_dokprij1 on "mzdy".dok_prijate (os_cislo, typ_dokumentu, datum_prijeti);
create  index "mzdy".ix_dokprij2 on "mzdy".dok_prijate (id_externi_vazby);
{ TABLE "mzdy".dokumenty row size = 0 number of columns = 13 index size = 0 }
{ unload file name = dokumenty.unl number of rows = 0 }
create table "mzdy".dokumenty 
  (
    id integer not null,
    nazev char(40) not null,
    agenda char(40) not null,
    rodic char(40) not null,
    dw_objekt char(40),
    platnost_od date,
    platnost_do date,
    dat_vzniku date,
    vytvoril char(8),
    archivace char(1),
    editor_word integer,
    zvl_pravo integer,
    sablona_rtf byte
  );
revoke all on "mzdy".dokumenty from "public";

create  index "mzdy".ix_dok_rodic on "mzdy".dokumenty (rodic);
{ TABLE "mzdy".dok_pkzon_hist row size = 0 number of columns = 145 index size = 0 }
{ unload file name = dok_pkzon_hist.unl number of rows = 0 }
create table "mzdy".dok_pkzon_hist 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    id_zazn integer not null,
    datum date,
    cas char(8),
    uzivatel char(64),
    zamestnavatel char(40),
    ico char(8),
    variabilni_symbol char(20),
    kod_ossz char(20),
    nazev_ossz char(30),
    druh char(1),
    druhv char(1),
    zahranicni integer,
    cislo_rozhodnuti char(20),
    prijmeni char(40),
    jmeno char(40),
    titul char(25),
    datum_narozeni date,
    rodne_cislo char(50),
    nastup date,
    vystup date,
    druh_cinnosti char(50),
    roz_obd_od char(20),
    roz_obd_do char(20),
    obdobi1 char(10),
    prijem1 char(15),
    vydoby1 char(10),
    obdobi2 char(10),
    prijem2 char(15),
    vydoby2 char(10),
    obdobi3 char(10),
    prijem3 char(15),
    vydoby3 char(10),
    obdobi4 char(10),
    prijem4 char(15),
    vydoby4 char(10),
    obdobi5 char(10),
    prijem5 char(15),
    vydoby5 char(10),
    obdobi6 char(10),
    prijem6 char(15),
    vydoby6 char(10),
    obdobi7 char(10),
    prijem7 char(15),
    vydoby7 char(10),
    obdobi8 char(10),
    prijem8 char(15),
    vydoby8 char(10),
    obdobi9 char(10),
    prijem9 char(15),
    vydoby9 char(10),
    obdobi10 char(10),
    prijem10 char(15),
    vydoby10 char(10),
    obdobi11 char(10),
    prijem11 char(15),
    vydoby11 char(10),
    obdobi12 char(10),
    prijem12 char(15),
    vydoby12 char(10),
    prijem13 char(15),
    vydoby13 char(10),
    prijem14 char(15),
    vydoby14 char(10),
    pracoval integer,
    pracoval_do date,
    pracoval_od date,
    odpracoval char(10),
    delka_smeny char(10),
    prijem char(10),
    duchod_pobira integer,
    duchod_druh char(40),
    zak_je integer,
    zak_spada integer,
    zam_ma integer,
    prac_volno char(30),
    volno_bez_nahrady integer,
    mat_nastupuje integer,
    mat_narodilo char(20),
    mat_pomoc char(20),
    soc_byla integer,
    prevedena_dne date,
    vm_ucet_cr integer,
    vm_ucet_uz integer,
    vm_poukazka integer,
    vm_hotovost integer,
    vm_predcisli char(6),
    vm_ucet_cislo char(10),
    vm_kod_banky char(4),
    vm_spec_symbol char(10),
    vm_uz_iban char(34),
    vm_uz_ucet_cislo char(34),
    vm_uz_ucet_nazev char(35),
    vm_uz_banka_nazev char(35),
    vm_uz_banka_typ_id char(3),
    vm_uz_banka_kod char(11),
    vm_uz_ulice char(35),
    vm_uz_cislo_domu char(16),
    vm_uz_obec char(35),
    vm_uz_psc char(11),
    vm_uz_stat char(2),
    vm_pp_ulice char(35),
    vm_pp_cislo_domu char(8),
    vm_pp_obec char(35),
    vm_pp_psc char(11),
    pocet_oh_pd decimal(5,2),
    pr_doba_pd decimal(5,2),
    exekuce_je integer,
    insolvence_je integer,
    dalsi_sdeleni char(112),
    kontaktni_osoba char(25),
    kontaktni_telefon char(15),
    kontaktni_email char(64),
    ve char(50),
    dne char(10),
    podpis char(75),
    priloha_pocet integer,
    priloha_naz1 char(56),
    priloha_typ1 char(56),
    priloha_kom1 char(112),
    priloha_naz2 char(56),
    priloha_typ2 char(56),
    priloha_kom2 char(112),
    priloha_naz3 char(56),
    priloha_typ3 char(56),
    priloha_kom3 char(112),
    priloha_naz4 char(56),
    priloha_typ4 char(56),
    priloha_kom4 char(112),
    priloha_naz5 char(56),
    priloha_typ5 char(56),
    priloha_kom5 char(112),
    priloha_naz6 char(56),
    priloha_typ6 char(56),
    priloha_kom6 char(112),
    priloha_naz7 char(56),
    priloha_typ7 char(56),
    priloha_kom7 char(112),
    priloha_naz8 char(56),
    priloha_typ8 char(56),
    priloha_kom8 char(112),
    priloha_naz9 char(56),
    priloha_typ9 char(56),
    priloha_kom9 char(112)
  );
revoke all on "mzdy".dok_pkzon_hist from "public";

create  index "mzdy".pkzon_hist_ix on "mzdy".dok_pkzon_hist (os_cislo, cislo_pom);
{ TABLE "mzdy".dok_pkep_hist row size = 0 number of columns = 34 index size = 0 }
{ unload file name = dok_pkep_hist.unl number of rows = 0 }
create table "mzdy".dok_pkep_hist 
  (
    id integer not null,
    uzivatel char(64),
    zamestnavatel char(40),
    zam_adresa char(64),
    ico char(8),
    variabilni_symbol char(20),
    kod_ossz char(20),
    nazev_ossz char(30),
    cislo_rozhodnuti char(20),
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    jmeno char(128),
    adresa char(64),
    rodne_cislo char(50),
    vosob integer,
    rodin_stav char(1),
    vyziv_os_exm integer,
    cislo_jednaci char(64),
    exekutorsky_urad char(64),
    prednostni char(1),
    celkova integer,
    provedena_kc integer,
    provedena_kedni date,
    dorucena_1platci date,
    nab_pr_moci date,
    vyse_ncastky decimal(16,2),
    za_obdobi char(16),
    kontaktni_osoba char(25),
    kontaktni_telefon char(15),
    ve char(50),
    dne char(10),
    podpis char(75),
    datum date,
    cas char(8)
  );
revoke all on "mzdy".dok_pkep_hist from "public";

create  index "mzdy".pkep_hist_ix on "mzdy".dok_pkep_hist (uzivatel, id);
{ TABLE "mzdy".dok_obsah row size = 0 number of columns = 3 index size = 0 }
{ unload file name = dok_obsah.unl number of rows = 0 }
create table "mzdy".dok_obsah 
  (
    id_dok_agenda integer not null,
    polozka integer not null,
    hodnota char(255)
  );
revoke all on "mzdy".dok_obsah from "public";

create unique  index "mzdy".ix_dok_obsah on "mzdy".dok_obsah (id_dok_agenda, polozka);
{ TABLE "mzdy".dok_nazvy_pol row size = 0 number of columns = 5 index size = 0 }
{ unload file name = dok_nazvy_pol.unl number of rows = 0 }
create table "mzdy".dok_nazvy_pol 
  (
    rodic char(40) not null,
    polozka integer not null,
    nazev_pol char(40) not null,
    hlavicka char(25),
    jine_plneni char(250)
  );
revoke all on "mzdy".dok_nazvy_pol from "public";

create unique  index "mzdy".ix_dok_nazvy_pol on "mzdy".dok_nazvy_pol (rodic, nazev_pol);
{ TABLE "mzdy".dok_druhy_prijat row size = 0 number of columns = 9 index size = 0 }
{ unload file name = dok_druhy_prijat.unl number of rows = 0 }
create table "mzdy".dok_druhy_prijat 
  (
    id_druhu char(7) not null,
    nazev char(60) not null,
    vyzad_odvsech char(1),
    vyhrazeno char(1),
    editovatelne char(1),
    portal_uch char(1),
    vych_hodn_portal integer not null,
    ulozit_soubor integer,
    nabizet_wf_novy integer
  );
revoke all on "mzdy".dok_druhy_prijat from "public";

{ TABLE "mzdy".dok_agenda row size = 0 number of columns = 19 index size = 0 }
{ unload file name = dok_agenda.unl number of rows = 0 }
create table "mzdy".dok_agenda 
  (
    id integer not null,
    id_dokumenty integer not null,
    id_agenda integer,
    adresat char(40) not null,
    id_adresat decimal(10,0) not null,
    platnost_od date,
    platnost_do date,
    dat_system date,
    dat_vystaveni date,
    vystavil char(8),
    poznamka char(40),
    platnost char(1),
    stav char(7),
    externi_druh char(7),
    externi_cesta char(100),
    id_predlohy integer,
    vazba_blob integer,
    typ_souboru char(4),
    portal char(1)
  );
revoke all on "mzdy".dok_agenda from "public";

create  index "mzdy".ix_dok_prac on "mzdy".dok_agenda (id_adresat, id_agenda);
create  index "mzdy".ix_dok_iddok on "mzdy".dok_agenda (id_dokumenty, id_adresat, id_agenda);
{ TABLE "mzdy".dojizdeni row size = 0 number of columns = 7 index size = 0 }
{ unload file name = dojizdeni.unl number of rows = 0 }
create table "mzdy".dojizdeni 
  (
    os_cislo decimal(10,0) not null,
    prostredek char(1) not null,
    typ char(10),
    cesta char(60),
    vzdalenost decimal(6,2),
    omezeni decimal(8,2),
    sazba decimal(16,2)
  );
revoke all on "mzdy".dojizdeni from "public";

create  index "mzdy".ix_dojizdeni on "mzdy".dojizdeni (os_cislo);
{ TABLE "mzdy".dodat_dov row size = 0 number of columns = 5 index size = 0 }
{ unload file name = dodat_dov.unl number of rows = 0 }
create table "mzdy".dodat_dov 
  (
    os_cislo decimal(10,0),
    datum_vyh date,
    datum_prizn date,
    poc_dni decimal(5,2),
    dny_cerp decimal(5,2)
  );
revoke all on "mzdy".dodat_dov from "public";

{ TABLE "mzdy".dod_prohl row size = 0 number of columns = 9 index size = 0 }
{ unload file name = dod_prohl.unl number of rows = 1 }
create table "mzdy".dod_prohl 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cis_pom integer,
    dr_proh integer not null,
    datum date,
    period char(1),
    vstup char(1) not null,
    vyjimka char(1),
    poznamka char(250)
  );
revoke all on "mzdy".dod_prohl from "public";

{ TABLE "mzdy".dok_podpisy row size = 0 number of columns = 7 index size = 0 }
{ unload file name = dok_podpisy.unl number of rows = 0 }
create table "mzdy".dok_podpisy 
  (
    id_podpisu integer not null,
    id_dok_agenda integer not null,
    id_poz integer not null,
    nazev char(60),
    id_infoblob integer,
    typ_souboru char(4),
    pocet_podpisu integer
  );
revoke all on "mzdy".dok_podpisy from "public";

{ TABLE "mzdy".dok_podpisy_proc row size = 0 number of columns = 8 index size = 0 }
{ unload file name = dok_podpisy_proc.unl number of rows = 0 }
create table "mzdy".dok_podpisy_proc 
  (
    id_podpisu_proc integer not null,
    id_podpisu integer not null,
    kod_podpisu char(10) not null,
    os_cislo decimal(10,0) not null,
    system_status integer not null,
    datum_zalozeni char(19),
    datum_podpisu char(19),
    os_cislo_overil decimal(10,0)
  );
revoke all on "mzdy".dok_podpisy_proc from "public";

create unique  index "mzdy".ix_idpodprc on "mzdy".dok_podpisy_proc (id_podpisu, kod_podpisu, os_cislo);
{ TABLE "mzdy".dochazka row size = 0 number of columns = 35 index size = 0 }
{ unload file name = dochazka.unl number of rows = 0 }
create table "mzdy".dochazka 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    rok integer not null,
    mesic integer not null,
    s_1 char(3),
    s_2 char(3),
    s_3 char(3),
    s_4 char(3),
    s_5 char(3),
    s_6 char(3),
    s_7 char(3),
    s_8 char(3),
    s_9 char(3),
    s_10 char(3),
    s_11 char(3),
    s_12 char(3),
    s_13 char(3),
    s_14 char(3),
    s_15 char(3),
    s_16 char(3),
    s_17 char(3),
    s_18 char(3),
    s_19 char(3),
    s_20 char(3),
    s_21 char(3),
    s_22 char(3),
    s_23 char(3),
    s_24 char(3),
    s_25 char(3),
    s_26 char(3),
    s_27 char(3),
    s_28 char(3),
    s_29 char(3),
    s_30 char(3),
    s_31 char(3)
  );
revoke all on "mzdy".dochazka from "public";

create unique  index "mzdy".ix_doch on "mzdy".dochazka (os_cislo, cislo_pom, rok, mesic);
{ TABLE "mzdy".dod_hod row size = 0 number of columns = 10 index size = 0 }
{ unload file name = dod_hod.unl number of rows = 0 }
create table "mzdy".dod_hod 
  (
    os_cislo decimal(10,0),
    cislo_pom integer not null,
    prac_str char(10),
    c_dokladu integer not null,
    kod integer,
    dat_od date,
    dat_do date,
    dny decimal(3,1),
    hodiny decimal(5,2),
    datum date not null
  );
revoke all on "mzdy".dod_hod from "public";

create  index "mzdy".ix_dod_hod1 on "mzdy".dod_hod (os_cislo, cislo_pom, kod, datum);
create  index "mzdy".ix_dod_hod2 on "mzdy".dod_hod (kod, dny, hodiny, datum);
{ TABLE "mzdy".dny_cyklu row size = 0 number of columns = 5 index size = 0 }
{ unload file name = dny_cyklu.unl number of rows = 0 }
create table "mzdy".dny_cyklu 
  (
    cyklus integer not null,
    den integer not null,
    typ_smeny char(1),
    hodiny decimal(4,2),
    zac char(4)
  );
revoke all on "mzdy".dny_cyklu from "public";

create  index "mzdy".ix_dnyc on "mzdy".dny_cyklu (cyklus);
{ TABLE "mzdy".divize row size = 0 number of columns = 2 index size = 0 }
{ unload file name = divize.unl number of rows = 0 }
create table "mzdy".divize 
  (
    cis_divize integer not null,
    naz_divize char(60) not null
  );
revoke all on "mzdy".divize from "public";

{ TABLE "mzdy".definice_dw_tisk row size = 0 number of columns = 5 index size = 0 }
{ unload file name = definice_dw_tisk.unl number of rows = 12 }
create table "mzdy".definice_dw_tisk 
  (
    id integer not null,
    sloupec char(30),
    zacatek integer,
    sirka integer,
    displaycol char(30)
  );
revoke all on "mzdy".definice_dw_tisk from "public";

{ TABLE "mzdy".definice_dw row size = 0 number of columns = 10 index size = 0 }
{ unload file name = definice_dw.unl number of rows = 1 }
create table "mzdy".definice_dw 
  (
    id integer not null,
    typ char(1),
    dw char(50),
    nazev char(80),
    hodnota char(255),
    hodnota2 char(255),
    uzivatel char(64),
    datum date,
    vychozi_var char(1),
    hodnota3 char(2000)
  );
revoke all on "mzdy".definice_dw from "public";

create  index "mzdy".ix_defindw_dw on "mzdy".definice_dw (dw);
{ TABLE "mzdy".dch_uzaverka row size = 0 number of columns = 4 index size = 0 }
{ unload file name = dch_uzaverka.unl number of rows = 0 }
create table "mzdy".dch_uzaverka 
  (
    obdobi date not null,
    datum_cas char(15) not null,
    zapsal decimal(10,0) not null,
    id_podniku integer not null
  );
revoke all on "mzdy".dch_uzaverka from "public";

{ TABLE "mzdy".dch_plan row size = 0 number of columns = 14 index size = 0 }
{ unload file name = dch_plan.unl number of rows = 0 }
create table "mzdy".dch_plan 
  (
    id integer not null,
    ref_id integer,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    kod integer not null,
    cas char(17) not null,
    doba char(6),
    id_poz integer,
    uzivatel char(64) not null,
    cas_zmeny char(15) not null,
    poznamka char(40),
    cas_do char(17),
    uvazek integer,
    prestavky integer
  );
revoke all on "mzdy".dch_plan from "public";

create  index "mzdy".ix_dchplan on "mzdy".dch_plan (kod, os_cislo, cislo_pom, cas);
create  index "mzdy".ix_dchplan1 on "mzdy".dch_plan (kod, os_cislo, cas);
create  index "mzdy".ix_dchplan2 on "mzdy".dch_plan (ref_id);
{ TABLE "mzdy".dch_plan_proc row size = 0 number of columns = 8 index size = 0 }
{ unload file name = dch_plan_proc.unl number of rows = 0 }
create table "mzdy".dch_plan_proc 
  (
    id integer not null,
    obdobi date not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    akce char(30) not null,
    cas char(17) not null,
    uzivatel decimal(10,0),
    login char(128)
  );
revoke all on "mzdy".dch_plan_proc from "public";

create  index "mzdy".ix_dchplpr on "mzdy".dch_plan_proc (obdobi, os_cislo, cislo_pom, akce);
create unique  index "mzdy".ix_dchplpr1 on "mzdy".dch_plan_proc (obdobi, os_cislo, cislo_pom, akce, cas);
{ TABLE "mzdy".dch_par_dne row size = 0 number of columns = 6 index size = 0 }
{ unload file name = dch_par_dne.unl number of rows = 0 }
create table "mzdy".dch_par_dne 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    datum date not null,
    potlac_prest integer,
    oznaceno integer,
    poznamka char(200)
  );
revoke all on "mzdy".dch_par_dne from "public";

{ TABLE "mzdy".dch_zpracovani row size = 0 number of columns = 22 index size = 0 }
{ unload file name = dch_zpracovani.unl number of rows = 0 }
create table "mzdy".dch_zpracovani 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    fond_plny integer,
    fond_prac integer,
    fond_svat integer,
    odpracovano integer,
    absence integer,
    rozdil integer,
    nad_plny_fond integer,
    npr_limit integer,
    npr_akt integer,
    pr_prevedeno integer,
    pr_proplaceno integer,
    pr_suma_rok integer,
    nariz_prescas integer,
    odpr_svatek integer,
    pripl_svatek integer,
    obdobi date not null,
    zpr_datum_cas char(15),
    zpr_uzivatel char(64),
    rpr_datum_cas char(15),
    rpr_uzivatel char(64)
  );
revoke all on "mzdy".dch_zpracovani from "public";

{ TABLE "mzdy".dod_proh row size = 0 number of columns = 5 index size = 0 }
{ unload file name = dod_proh.unl number of rows = 0 }
create table "mzdy".dod_proh 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    prohl integer,
    datum date,
    poznamka char(50)
  );
revoke all on "mzdy".dod_proh from "public";

create  index "mzdy".ix_dod_proh on "mzdy".dod_proh (os_cislo, cislo_pom);
{ TABLE "mzdy".dch_kody row size = 0 number of columns = 24 index size = 0 }
{ unload file name = dch_kody.unl number of rows = 12 }
create table "mzdy".dch_kody 
  (
    vyr_kod integer not null,
    nazev char(40) not null,
    zkratka char(3),
    mzd_kod1 integer,
    mzd_kod2 integer,
    mzd_kod3 integer,
    sumace integer not null,
    ident integer not null,
    ident2 integer,
    ident3 integer,
    prenaset integer not null,
    barva_back char(10),
    barva_fore char(10),
    prestavka integer not null,
    strava integer,
    kalendar integer not null,
    plan_smen integer not null,
    terminal integer not null,
    ppd integer not null,
    term_poradi integer not null,
    zpusob char(1) not null,
    podniky char(250),
    druhy_pom char(100),
    platnost_do date
  );
revoke all on "mzdy".dch_kody from "public";

{ TABLE "mzdy".dch_kody_suma row size = 0 number of columns = 11 index size = 0 }
{ unload file name = dch_kody_suma.unl number of rows = 0 }
create table "mzdy".dch_kody_suma 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    kod integer not null,
    prac_str char(10),
    c_pole1 char(12),
    c_pole2 char(10),
    delka integer not null,
    castka decimal(16,2),
    datum date not null,
    obdobi date not null
  );
revoke all on "mzdy".dch_kody_suma from "public";

create  index "mzdy".ix_osc on "mzdy".dch_kody_suma (os_cislo, cislo_pom, kod, prac_str, obdobi);
create  index "mzdy".ix_c_pole1 on "mzdy".dch_kody_suma (c_pole1, datum, obdobi);
create  index "mzdy".ix_c_pole2 on "mzdy".dch_kody_suma (c_pole2, datum, obdobi);
{ TABLE "mzdy".dch_modely row size = 0 number of columns = 51 index size = 0 }
{ unload file name = dch_modely.unl number of rows = 0 }
create table "mzdy".dch_modely 
  (
    id integer not null,
    cislo integer not null,
    nazev char(20) not null,
    zac_smeny integer,
    kon_smeny integer,
    pres_delka integer not null,
    pres_delka1 integer,
    pres_inter integer not null,
    pres_inter1 integer not null,
    pres_ic char(1) not null,
    ranni_od integer not null,
    odpol_od integer not null,
    nocni_od integer not null,
    prislsmeny integer not null,
    nar_odpol integer not null,
    nar_odpol_odpr integer,
    nar_nocni integer not null,
    nar_nocni_odpr integer,
    nar_svat integer not null,
    nar_sobota integer not null,
    nar_nedele integer not null,
    prescas integer not null,
    aut_svatek integer,
    stravne1_po integer,
    stravne2_po integer,
    kod_stravneho integer,
    cena_stravneho decimal(16,4),
    kod_strav_prisp integer,
    cena_strav_prisp decimal(16,4),
    pr_jednotka char(1) not null,
    pr_start_datum date,
    pr_delka integer,
    pr_poc_obd integer,
    pr_mes_od integer,
    pr_nepl_limit integer,
    pr_nepl_limit_v integer,
    pr_odecet_propl integer,
    pr_nabizet_vse integer,
    fond_exp integer,
    gen_cast_dne integer,
    aut_gen_ne integer,
    schval_ne integer,
    gen_kod integer,
    pf_jiny integer,
    pf_jednotka char(1),
    pf_delka integer,
    pf_start_datum date,
    ppd_od integer,
    ppd_do integer,
    slc_neorez integer,
    def_model integer not null
  );
revoke all on "mzdy".dch_modely from "public";

create unique  index "mzdy".ix_dch_modely on "mzdy".dch_modely (id);
{ TABLE "mzdy".dch_modely_zal row size = 0 number of columns = 52 index size = 0 }
{ unload file name = dch_modely_zal.unl number of rows = 0 }
create table "mzdy".dch_modely_zal 
  (
    id integer not null,
    cislo integer not null,
    nazev char(20) not null,
    zac_smeny integer,
    kon_smeny integer,
    pres_delka integer not null,
    pres_delka1 integer,
    pres_inter integer not null,
    pres_inter1 integer not null,
    pres_ic char(1) not null,
    ranni_od integer not null,
    odpol_od integer not null,
    nocni_od integer not null,
    prislsmeny integer not null,
    nar_odpol integer not null,
    nar_odpol_odpr integer,
    nar_nocni integer not null,
    nar_nocni_odpr integer,
    nar_svat integer not null,
    nar_sobota integer not null,
    nar_nedele integer not null,
    prescas integer not null,
    aut_svatek integer,
    stravne1_po integer,
    stravne2_po integer,
    kod_stravneho integer,
    cena_stravneho decimal(16,4),
    kod_strav_prisp integer,
    cena_strav_prisp decimal(16,4),
    pr_jednotka char(1) not null,
    pr_start_datum date,
    pr_delka integer,
    pr_poc_obd integer,
    pr_mes_od integer,
    pr_nepl_limit integer,
    pr_nepl_limit_v integer,
    pr_odecet_propl integer,
    pr_nabizet_vse integer,
    fond_exp integer,
    gen_cast_dne integer,
    aut_gen_ne integer,
    schval_ne integer,
    gen_kod integer,
    pf_jiny integer,
    pf_jednotka char(1),
    pf_delka integer,
    pf_start_datum date,
    ppd_od integer,
    ppd_do integer,
    slc_neorez integer,
    def_model integer not null,
    datum date not null
  );
revoke all on "mzdy".dch_modely_zal from "public";

{ TABLE "mzdy".dbarch_process row size = 0 number of columns = 3 index size = 0 }
{ unload file name = dbarch_process.unl number of rows = 0 }
create table "mzdy".dbarch_process 
  (
    id_dbarch integer,
    zpracovano char(1),
    aplikace char(30)
  );
revoke all on "mzdy".dbarch_process from "public";

{ TABLE "mzdy".dch_casy row size = 0 number of columns = 21 index size = 0 }
{ unload file name = dch_casy.unl number of rows = 0 }
create table "mzdy".dch_casy 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    kod integer not null,
    prac_str char(10),
    cas char(17) not null,
    doba char(6),
    kodprst char(6),
    sazba decimal(16,2),
    castka decimal(16,2),
    c_pole1 char(20),
    c_pole2 char(10),
    n_pole1 integer,
    n_pole2 integer,
    operace char(1) not null,
    id_poz integer,
    uzivatel char(64) not null,
    cas_zmeny char(15) not null,
    poznamka char(999),
    id_foto integer,
    status char(1)
  );
revoke all on "mzdy".dch_casy from "public";

create  index "mzdy".ix_dchcasy on "mzdy".dch_casy (os_cislo, cislo_pom, cas, status);
create  index "mzdy".ix_dchcasy2 on "mzdy".dch_casy (id_foto);
create  index "mzdy".ix_dchcasy3 on "mzdy".dch_casy (n_pole1);
create  index "mzdy".ix_dchcasy4 on "mzdy".dch_casy (os_cislo, id_poz);
{ TABLE "mzdy".dbarch row size = 0 number of columns = 21 index size = 0 }
{ unload file name = dbarch.unl number of rows = 17199 }
create table "mzdy".dbarch 
  (
    id integer not null,
    druh_zmeny char(1) not null,
    tabulka char(18) not null,
    sloupec char(18),
    old_hodnota char(100),
    new_hodnota char(100),
    podminka char(200),
    datum_zmeny date not null,
    cas_zmeny char(8),
    v_obdobi date not null,
    verze char(11),
    zdroj_zmeny char(2) not null,
    upres_zdroje char(80),
    id_budzmeny integer,
    uzivatel char(64),
    os_cislo decimal(10,0),
    cislo_pom integer,
    zpracovano char(1),
    zapis integer not null,
    h1h char(32),
    h2h char(80)
  );
revoke all on "mzdy".dbarch from "public";

create  index "mzdy".ix_dbarch_id on "mzdy".dbarch (id);
create  index "mzdy".ix_dbarch_2 on "mzdy".dbarch (datum_zmeny, cas_zmeny);
create  index "mzdy".ix_dbarch_3 on "mzdy".dbarch (tabulka, sloupec);
create  index "mzdy".ix_dbarch_4 on "mzdy".dbarch (os_cislo);
{ TABLE "mzdy".cykly row size = 0 number of columns = 12 index size = 0 }
{ unload file name = cykly.unl number of rows = 0 }
create table "mzdy".cykly 
  (
    cyklus integer not null,
    naz_cyklu char(20),
    delka integer not null,
    hod_ran decimal(4,2),
    hod_odp decimal(4,2),
    hod_noc decimal(4,2),
    upravy_hod char(1),
    ran_zac char(4),
    odp_zac char(4),
    noc_zac char(4),
    upravy_zac char(1),
    svatky char(1)
  );
revoke all on "mzdy".cykly from "public";

{ TABLE "mzdy".cykl_svatky row size = 0 number of columns = 2 index size = 0 }
{ unload file name = cykl_svatky.unl number of rows = 0 }
create table "mzdy".cykl_svatky 
  (
    cis_roz integer not null,
    svatek date not null
  );
revoke all on "mzdy".cykl_svatky from "public";

create  index "mzdy".ix_cro_svt1 on "mzdy".cykl_svatky (cis_roz);
create  index "mzdy".ix_cro_svt2 on "mzdy".cykl_svatky (cis_roz, svatek);
{ TABLE "mzdy".cykl_rozvrhy row size = 0 number of columns = 5 index size = 0 }
{ unload file name = cykl_rozvrhy.unl number of rows = 0 }
create table "mzdy".cykl_rozvrhy 
  (
    cis_roz integer not null,
    naz_roz char(20),
    cyklus integer not null,
    dat_od date not null,
    dat_do date
  );
revoke all on "mzdy".cykl_rozvrhy from "public";

{ TABLE "mzdy".dch_chyby row size = 0 number of columns = 6 index size = 0 }
{ unload file name = dch_chyby.unl number of rows = 0 }
create table "mzdy".dch_chyby 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    datum date not null,
    cas char(15),
    cislo_chyby integer not null,
    text_chyby char(4000) not null
  );
revoke all on "mzdy".dch_chyby from "public";

create  index "mzdy".ix_dch_chyby on "mzdy".dch_chyby (datum);
{ TABLE "mzdy".dch_cisty_vykaz row size = 0 number of columns = 15 index size = 0 }
{ unload file name = dch_cisty_vykaz.unl number of rows = 0 }
create table "mzdy".dch_cisty_vykaz 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    kod integer,
    prizn char(10),
    prac_str char(10),
    cas_od char(15),
    cas_do char(15),
    doba integer not null,
    c_pole1 char(20),
    c_pole2 char(20),
    n_pole1 integer,
    n_pole2 integer,
    id_poz integer,
    datum date not null,
    obdobi date not null
  );
revoke all on "mzdy".dch_cisty_vykaz from "public";

create  index "mzdy".ix_dchcisty on "mzdy".dch_cisty_vykaz (os_cislo, cislo_pom, datum, kod, prizn, doba);
create  index "mzdy".ix_dchcisty2 on "mzdy".dch_cisty_vykaz (n_pole1);
create  index "mzdy".ix_dchcisty3 on "mzdy".dch_cisty_vykaz (prac_str);
create  index "mzdy".ix_dchcisty4 on "mzdy".dch_cisty_vykaz (id_poz);
create  index "mzdy".ix_dchcisty5 on "mzdy".dch_cisty_vykaz (obdobi);
{ TABLE "mzdy".dch_cisty_vykaz_z row size = 0 number of columns = 15 index size = 0 }
{ unload file name = dch_cisty_vykaz_z.unl number of rows = 0 }
create table "mzdy".dch_cisty_vykaz_z 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    kod integer,
    prizn char(10),
    prac_str char(10),
    cas_od char(15),
    cas_do char(15),
    doba integer not null,
    c_pole1 char(20),
    c_pole2 char(20),
    n_pole1 integer,
    n_pole2 integer,
    id_poz integer,
    datum date not null,
    obdobi date not null
  );
revoke all on "mzdy".dch_cisty_vykaz_z from "public";

create  index "mzdy".ix_dchcisty10 on "mzdy".dch_cisty_vykaz_z (os_cislo, cislo_pom, datum, kod, prizn, doba);
create  index "mzdy".ix_dchcisty210 on "mzdy".dch_cisty_vykaz_z (n_pole1);
create  index "mzdy".ix_dchcisty310 on "mzdy".dch_cisty_vykaz_z (prac_str);
create  index "mzdy".ix_dchcisty410 on "mzdy".dch_cisty_vykaz_z (id_poz);
create  index "mzdy".ix_dchcisty510 on "mzdy".dch_cisty_vykaz_z (obdobi);
{ TABLE "mzdy".dch_den_suma row size = 0 number of columns = 25 index size = 0 }
{ unload file name = dch_den_suma.unl number of rows = 0 }
create table "mzdy".dch_den_suma 
  (
    datum date not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    fond integer not null,
    svatek integer,
    odprac integer not null,
    odpoledni integer not null,
    nocni integer not null,
    absence integer not null,
    prestavky integer not null,
    pohotovost integer not null,
    saldo integer not null,
    prescas integer not null,
    rozdil integer not null,
    stravenky integer,
    id_poz integer,
    pl_sm_od char(15),
    pl_sm_do char(15),
    vyk_sm_od char(15),
    vyk_sm_do char(15),
    zkr_vykazano integer,
    zkr_rozdil integer,
    zkr_nad_fond integer,
    zkr_prescas integer,
    obdobi date not null
  );
revoke all on "mzdy".dch_den_suma from "public";

create  index "mzdy".ix_dch_ds on "mzdy".dch_den_suma (obdobi);
{ TABLE "mzdy".cis_ucto_ppf row size = 0 number of columns = 4 index size = 0 }
{ unload file name = cis_ucto_ppf.unl number of rows = 0 }
create table "mzdy".cis_ucto_ppf 
  (
    typ integer not null,
    udaj char(20) not null,
    popis char(60),
    id_podniku integer
  );
revoke all on "mzdy".cis_ucto_ppf from "public";

{ TABLE "mzdy".cis_stup_nar_prac row size = 0 number of columns = 8 index size = 0 }
{ unload file name = cis_stup_nar_prac.unl number of rows = 8 }
create table "mzdy".cis_stup_nar_prac 
  (
    cislo char(7) not null,
    popis char(60) not null,
    min_tarif_hod decimal(16,4),
    min_tarif_mes decimal(16,2),
    min_hr_mzda_hod decimal(16,4),
    min_hr_mzda_mes decimal(16,2),
    min_tarif_hod_duch decimal(16,4),
    min_tarif_mes_duch decimal(16,2)
  );
revoke all on "mzdy".cis_stup_nar_prac from "public";

{ TABLE "mzdy".cis_st_prisl row size = 0 number of columns = 6 index size = 0 }
{ unload file name = cis_st_prisl.unl number of rows = 252 }
create table "mzdy".cis_st_prisl 
  (
    kod_ciselny char(3) not null,
    kod_znakovy char(3) not null,
    kod_znakovy2 char(2),
    cesky char(150) not null,
    anglicky char(155),
    clen_eu char(1)
  );
revoke all on "mzdy".cis_st_prisl from "public";

{ TABLE "mzdy".cis_sluz_oznaceni row size = 0 number of columns = 4 index size = 0 }
{ unload file name = cis_sluz_oznaceni.unl number of rows = 27 }
create table "mzdy".cis_sluz_oznaceni 
  (
    cislo_sluz_oznac char(3) not null,
    sluz_oznac char(5) not null,
    zkratka char(20) not null,
    nazev char(50) not null
  );
revoke all on "mzdy".cis_sluz_oznaceni from "public";

create unique  index "mzdy".ix_cis_sluz_ozn1 on "mzdy".cis_sluz_oznaceni (cislo_sluz_oznac);
{ TABLE "mzdy".cis_ukazatele row size = 0 number of columns = 11 index size = 0 }
{ unload file name = cis_ukazatele.unl number of rows = 0 }
create table "mzdy".cis_ukazatele 
  (
    kod integer not null,
    nazev char(70),
    odpovedny char(40),
    mu char(10),
    koef_plus decimal(6,2),
    koef_minus decimal(6,2),
    limit_dolni decimal(6,2),
    limit_horni decimal(6,2),
    typ char(1),
    plati_od date,
    plati_do date
  );
revoke all on "mzdy".cis_ukazatele from "public";

create  index "mzdy".ix_cis_ukaz on "mzdy".cis_ukazatele (typ);
{ TABLE "mzdy".cis_rizik row size = 0 number of columns = 5 index size = 0 }
{ unload file name = cis_rizik.unl number of rows = 2 }
create table "mzdy".cis_rizik 
  (
    cislo char(7) not null,
    vyznam char(120),
    castka decimal(16,2),
    kat1 char(2),
    kat2 char(2)
  );
revoke all on "mzdy".cis_rizik from "public";

create  index "mzdy".ix_cis_riz on "mzdy".cis_rizik (cislo);
{ TABLE "mzdy".cis_projekty row size = 0 number of columns = 20 index size = 0 }
{ unload file name = cis_projekty.unl number of rows = 0 }
create table "mzdy".cis_projekty 
  (
    id integer not null,
    cislo char(40) not null,
    nazev char(50) not null,
    plati_od date not null,
    plati_do date,
    adm_stred char(10),
    prac_str char(10),
    faze char(1) not null,
    priprava_od date,
    priprava_do date,
    realizace_od date,
    realizace_do date,
    udrzitelnost_do date,
    finance decimal(16,2),
    refundace char(1),
    reg_cislo char(25),
    vedouci char(50),
    charakteristika char(100),
    id_nahr_proj integer,
    nahrazovat_rp char(1)
  );
revoke all on "mzdy".cis_projekty from "public";

create unique  index "mzdy".ix_cprj_cis on "mzdy".cis_projekty (cislo);
{ TABLE "mzdy".cis_pojmy row size = 0 number of columns = 2 index size = 0 }
{ unload file name = cis_pojmy.unl number of rows = 662 }
create table "mzdy".cis_pojmy 
  (
    nazev char(30) not null,
    kod integer not null
  );
revoke all on "mzdy".cis_pojmy from "public";

create unique  index "mzdy".ix_pojmy on "mzdy".cis_pojmy (nazev, kod);
create  index "mzdy".ix_pojmy2 on "mzdy".cis_pojmy (nazev);
{ TABLE "mzdy".cis_oj_atrib row size = 0 number of columns = 2 index size = 0 }
{ unload file name = cis_oj_atrib.unl number of rows = 0 }
create table "mzdy".cis_oj_atrib 
  (
    id integer not null,
    nazev char(25) not null
  );
revoke all on "mzdy".cis_oj_atrib from "public";

{ TABLE "mzdy".cis_odevne row size = 0 number of columns = 4 index size = 0 }
{ unload file name = cis_odevne.unl number of rows = 0 }
create table "mzdy".cis_odevne 
  (
    typ char(3) not null,
    nastup decimal(16,2),
    obnova decimal(16,2),
    platnost_od date not null
  );
revoke all on "mzdy".cis_odevne from "public";

{ TABLE "mzdy".cis_ockov row size = 0 number of columns = 6 index size = 0 }
{ unload file name = cis_ockov.unl number of rows = 0 }
create table "mzdy".cis_ockov 
  (
    cislo integer not null,
    nazev char(40) not null,
    delka integer,
    lekar integer,
    platce integer,
    cena decimal(16,2)
  );
revoke all on "mzdy".cis_ockov from "public";

{ TABLE "mzdy".cis_obci row size = 0 number of columns = 3 index size = 0 }
{ unload file name = cis_obci.unl number of rows = 6249 }
create table "mzdy".cis_obci 
  (
    cis_obce char(6) not null,
    naz_obce char(40) not null,
    nuts4 char(7) not null
  );
revoke all on "mzdy".cis_obci from "public";

{ TABLE "mzdy".cis_norem row size = 0 number of columns = 7 index size = 0 }
{ unload file name = cis_norem.unl number of rows = 0 }
create table "mzdy".cis_norem 
  (
    id integer not null,
    cislo char(10) not null,
    nazev char(40) not null,
    sazba decimal(16,5) not null,
    proc_prem decimal(5,2),
    ks_na_sm integer,
    plati_do date
  );
revoke all on "mzdy".cis_norem from "public";

create  index "mzdy".ix_cis_nor1 on "mzdy".cis_norem (cislo);
create  index "mzdy".ix_cis_nor2 on "mzdy".cis_norem (cislo, plati_do);
{ TABLE "mzdy".cis_nabidka_textu row size = 0 number of columns = 3 index size = 0 }
{ unload file name = cis_nabidka_textu.unl number of rows = 0 }
create table "mzdy".cis_nabidka_textu 
  (
    dw_object char(40) not null,
    polozka char(40) not null,
    hodnota char(255) not null
  );
revoke all on "mzdy".cis_nabidka_textu from "public";

create  index "mzdy".ix_cis_nabtext on "mzdy".cis_nabidka_textu (dw_object, polozka);
{ TABLE "mzdy".cis_kzam row size = 0 number of columns = 2 index size = 0 }
{ unload file name = cis_kzam.unl number of rows = 1367 }
create table "mzdy".cis_kzam 
  (
    kzam integer not null,
    nazev char(150)
  );
revoke all on "mzdy".cis_kzam from "public";

create  index "mzdy".ix_kzam on "mzdy".cis_kzam (kzam);
{ TABLE "mzdy".cis_obor_stsluzby row size = 0 number of columns = 5 index size = 0 }
{ unload file name = cis_obor_stsluzby.unl number of rows = 79 }
create table "mzdy".cis_obor_stsluzby 
  (
    id_oboru_stsluz char(10) not null,
    zkratka char(8),
    nazev char(150) not null,
    datum_od date,
    datum_do date
  );
revoke all on "mzdy".cis_obor_stsluzby from "public";

create unique  index "mzdy".ix_obor_stsluz1 on "mzdy".cis_obor_stsluzby (id_oboru_stsluz);
{ TABLE "mzdy".cis_notifikaci row size = 0 number of columns = 23 index size = 0 }
{ unload file name = cis_notifikaci.unl number of rows = 0 }
create table "mzdy".cis_notifikaci 
  (
    kod integer not null,
    nazev char(150) not null,
    aplikace char(1) not null,
    druh_odezvy char(1),
    datum_od date,
    datum_do date,
    spustit char(17),
    priorita integer not null,
    typ_periody char(3),
    perioda decimal(10,0),
    email_od char(80),
    typ_email_prij char(120),
    skupina char(30),
    specifikum_1 char(350),
    specifikum_2 char(350),
    specifikum_3 char(350),
    specifikum_4 char(350),
    specifikum_5 char(350),
    specifikum_6 char(350),
    specifikum_7 char(350),
    specifikum_8 char(350),
    specifikum_9 char(350),
    specifikum_10 char(350)
  );
revoke all on "mzdy".cis_notifikaci from "public";

{ TABLE "mzdy".cis_operaci row size = 0 number of columns = 6 index size = 0 }
{ unload file name = cis_operaci.unl number of rows = 0 }
create table "mzdy".cis_operaci 
  (
    id integer not null,
    cislo char(10),
    nazev char(40),
    cislo_cinnosti char(17),
    kumul_ukazatel char(10),
    pracoviste char(8)
  );
revoke all on "mzdy".cis_operaci from "public";

{ TABLE "mzdy".cis_cinnosti row size = 0 number of columns = 9 index size = 0 }
{ unload file name = cis_cinnosti.unl number of rows = 10 }
create table "mzdy".cis_cinnosti 
  (
    cislo char(17) not null,
    vyznam char(400) not null,
    typ char(7),
    soubor char(120),
    id_blobu integer,
    nenabizet integer,
    kod_zeme char(3),
    klicova integer,
    id_zakazky integer
  );
revoke all on "mzdy".cis_cinnosti from "public";

{ TABLE "mzdy".cis_budov row size = 0 number of columns = 13 index size = 0 }
{ unload file name = cis_budov.unl number of rows = 0 }
create table "mzdy".cis_budov 
  (
    kod_budovy char(7) not null,
    nazev_budovy char(80),
    misto_vykonu char(50),
    kod_obce char(6),
    nazev_obce char(40),
    ulice char(40),
    cislo char(14),
    postcode char(10),
    okres_lau char(7),
    okres_nazev char(30),
    stat char(2),
    nepouzivat integer,
    poznamka char(30)
  );
revoke all on "mzdy".cis_budov from "public";

{ TABLE "mzdy".cile_stupne row size = 0 number of columns = 6 index size = 0 }
{ unload file name = cile_stupne.unl number of rows = 0 }
create table "mzdy".cile_stupne 
  (
    id_stupne_cile integer not null,
    poradi_stupne integer not null,
    popis_stupne char(80),
    typ_cilu integer not null,
    verze_stupnu integer not null,
    procento decimal(6,2)
  );
revoke all on "mzdy".cile_stupne from "public";

{ TABLE "mzdy".cile_typy row size = 0 number of columns = 4 index size = 0 }
{ unload file name = cile_typy.unl number of rows = 0 }
create table "mzdy".cile_typy 
  (
    typ_cilu integer,
    nazev_typu char(50),
    skupina integer,
    vaha integer
  );
revoke all on "mzdy".cile_typy from "public";

{ TABLE "mzdy".cis_kl_po_zam row size = 0 number of columns = 3 index size = 0 }
{ unload file name = cis_kl_po_zam.unl number of rows = 27 }
create table "mzdy".cis_kl_po_zam 
  (
    kod char(4) not null,
    nazev char(120),
    nazev_zkr char(23)
  );
revoke all on "mzdy".cis_kl_po_zam from "public";

{ TABLE "mzdy".cis_jubilea_kc row size = 0 number of columns = 6 index size = 0 }
{ unload file name = cis_jubilea_kc.unl number of rows = 0 }
create table "mzdy".cis_jubilea_kc 
  (
    roky integer not null,
    kc decimal(16,2) not null,
    indikace char(1) not null,
    dat_od date,
    dat_do date,
    roky_zam integer
  );
revoke all on "mzdy".cis_jubilea_kc from "public";

create  index "mzdy".ix_cis_jibilea on "mzdy".cis_jubilea_kc (roky, kc);
{ TABLE "mzdy".cis_hodnost row size = 0 number of columns = 9 index size = 0 }
{ unload file name = cis_hodnost.unl number of rows = 0 }
create table "mzdy".cis_hodnost 
  (
    hodnost char(20) not null,
    hodn_ozn char(9) not null,
    nazev char(60) not null,
    sluz_hodn char(9),
    sl_nazev char(60),
    trida integer,
    vysluha integer not null,
    priplatek decimal(16,2) not null,
    nabizet char(1)
  );
revoke all on "mzdy".cis_hodnost from "public";

{ TABLE "mzdy".cis_druh_pom row size = 0 number of columns = 5 index size = 0 }
{ unload file name = cis_druh_pom.unl number of rows = 8 }
create table "mzdy".cis_druh_pom 
  (
    uziv_druh char(2) not null,
    sys_druh char(1) not null,
    vyznam char(60),
    mzd_pol integer,
    sluz_zakon integer not null
  );
revoke all on "mzdy".cis_druh_pom from "public";

{ TABLE "mzdy".cis_premie row size = 0 number of columns = 12 index size = 0 }
{ unload file name = cis_premie.unl number of rows = 0 }
create table "mzdy".cis_premie 
  (
    id integer not null,
    divize integer,
    skup_str integer,
    str char(10),
    id_profese integer not null,
    stupen integer,
    kod_prem integer,
    sazba decimal(16,2),
    kraceni decimal(5,2),
    poznamka char(60),
    plati_od date,
    plati_do date
  );
revoke all on "mzdy".cis_premie from "public";

create  index "mzdy".ix_cis_pr_div on "mzdy".cis_premie (divize);
create  index "mzdy".ix_cis_pr_sstr on "mzdy".cis_premie (skup_str);
create  index "mzdy".ix_cis_pr_str on "mzdy".cis_premie (str);
create  index "mzdy".ix_cis_pr_prf on "mzdy".cis_premie (id_profese, stupen);
create  index "mzdy".ix_cis_pr_dat on "mzdy".cis_premie (plati_od, plati_do);
{ TABLE "mzdy".budgety_ucely row size = 0 number of columns = 5 index size = 0 }
{ unload file name = budgety_ucely.unl number of rows = 0 }
create table "mzdy".budgety_ucely 
  (
    id integer not null,
    id_budgetu integer not null,
    ucel integer not null,
    kod_mzdpol integer,
    klic_ucelu char(20)
  );
revoke all on "mzdy".budgety_ucely from "public";

create  index "mzdy".ix_budget_ucel1 on "mzdy".budgety_ucely (id_budgetu);
create  index "mzdy".ix_budget_ucel2 on "mzdy".budgety_ucely (ucel, kod_mzdpol);
{ TABLE "mzdy".budgety_pohyby row size = 0 number of columns = 16 index size = 0 }
{ unload file name = budgety_pohyby.unl number of rows = 0 }
create table "mzdy".budgety_pohyby 
  (
    id_pohybu integer not null,
    guid char(36),
    agenda integer not null,
    id_budgetu integer not null,
    smer_pohybu integer not null,
    druh_pohybu integer not null,
    id_protibudget integer,
    rezervace integer not null,
    id_pozadavku integer,
    castka decimal(16,2) not null,
    datum_zapisu date not null,
    obdobi date,
    os_cislo decimal(10,0),
    cislo_pom integer,
    popis char(100),
    id_session char(36)
  );
revoke all on "mzdy".budgety_pohyby from "public";

create  index "mzdy".ix_budget_poh1 on "mzdy".budgety_pohyby (guid);
create  index "mzdy".ix_budget_poh2 on "mzdy".budgety_pohyby (id_budgetu, rezervace, castka, smer_pohybu);
{ TABLE "mzdy".budgety row size = 0 number of columns = 11 index size = 0 }
{ unload file name = budgety.unl number of rows = 0 }
create table "mzdy".budgety 
  (
    id_budgetu integer not null,
    kod_budgetu char(15) not null,
    nazev_budgetu char(100),
    obdobi_od date not null,
    obdobi_do date not null,
    typ_jednotky integer not null,
    kod_jednotky char(12) not null,
    id_podniku integer not null,
    aktivita integer not null,
    typ_podriz_jedn integer,
    id_nadriz_budgetu integer
  );
revoke all on "mzdy".budgety from "public";

create  index "mzdy".ix_budgety1 on "mzdy".budgety (obdobi_od, obdobi_do, aktivita, id_podniku);
{ TABLE "mzdy".bulletin row size = 0 number of columns = 11 index size = 0 }
{ unload file name = bulletin.unl number of rows = 0 }
create table "mzdy".bulletin 
  (
    id integer not null,
    datum_od date not null,
    datum_do date,
    publikovat integer,
    nadpis char(120),
    telo char(500),
    id_telo integer,
    id_image integer,
    typ integer,
    tlacitko char(120),
    id_dok_agenda integer
  );
revoke all on "mzdy".bulletin from "public";

create  index "mzdy".ix_bull1 on "mzdy".bulletin (datum_od, datum_do, publikovat);
create  index "mzdy".ix_bull2 on "mzdy".bulletin (datum_od, datum_do, publikovat, typ);
{ TABLE "mzdy".bulletin_adr row size = 0 number of columns = 4 index size = 0 }
{ unload file name = bulletin_adr.unl number of rows = 0 }
create table "mzdy".bulletin_adr 
  (
    id integer not null,
    id_bull integer not null,
    typ_org_j integer not null,
    org_j char(12) not null
  );
revoke all on "mzdy".bulletin_adr from "public";

create  index "mzdy".ix_bull_adr1 on "mzdy".bulletin_adr (id_bull);
{ TABLE "mzdy".bulletin_stats row size = 0 number of columns = 7 index size = 0 }
{ unload file name = bulletin_stats.unl number of rows = 0 }
create table "mzdy".bulletin_stats 
  (
    id integer not null,
    id_bull integer not null,
    id_odpovedi integer,
    os_cis_hash char(32),
    os_cislo decimal(10,0),
    zobrazeno date,
    precteno date
  );
revoke all on "mzdy".bulletin_stats from "public";

create  index "mzdy".ix_bull_st1 on "mzdy".bulletin_stats (id_bull);
create  index "mzdy".ix_bull_st2 on "mzdy".bulletin_stats (id_bull, os_cislo);
create  index "mzdy".ix_bull_st3 on "mzdy".bulletin_stats (id, id_bull, os_cislo);
create  index "mzdy".ix_bull_st4 on "mzdy".bulletin_stats (id_bull, os_cis_hash);
{ TABLE "mzdy".benefit_volno row size = 0 number of columns = 17 index size = 0 }
{ unload file name = benefit_volno.unl number of rows = 0 }
create table "mzdy".benefit_volno 
  (
    kod integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    kod_cerp integer,
    kod_propl integer,
    jednotka char(1) not null,
    narok_zakl decimal(5,2),
    narok decimal(5,2) not null,
    zust_minul decimal(5,2) not null,
    cerpano decimal(5,2) not null,
    cerp_akt decimal(5,2),
    zustatek decimal(5,2),
    prizn_narok char(1),
    prizn_propl char(1),
    prizn_prev char(1),
    prizn_kontr char(1),
    datum date not null
  );
revoke all on "mzdy".benefit_volno from "public";

create  index "mzdy".ix_benef_vol on "mzdy".benefit_volno (kod, os_cislo);
create  index "mzdy".ix_benef_vol2 on "mzdy".benefit_volno (kod, os_cislo, cislo_pom);
create  index "mzdy".ix_benef_vol3 on "mzdy".benefit_volno (os_cislo, cislo_pom, kod, kod_cerp, kod_propl);
{ TABLE "mzdy".atrib_skup row size = 0 number of columns = 4 index size = 0 }
{ unload file name = atrib_skup.unl number of rows = 13 }
create table "mzdy".atrib_skup 
  (
    cis_skup_atr integer not null,
    naz_skup_atr char(25) not null,
    bitmapa char(20),
    poradi integer
  );
revoke all on "mzdy".atrib_skup from "public";

{ TABLE "mzdy".atributy row size = 0 number of columns = 27 index size = 0 }
{ unload file name = atributy.unl number of rows = 111 }
create table "mzdy".atributy 
  (
    cis_atributu integer not null,
    naz_atributu char(40) not null,
    bitmapa char(20),
    cis_skup_atr integer not null,
    typ_atributu integer not null,
    opakovani integer not null,
    dat_typ_atr integer not null,
    dddw char(40),
    dddw_argument integer,
    datacolumn char(20),
    displaycolumn char(20),
    printcolumn char(20),
    zakladni char(1),
    propojovaci char(1),
    propojeno_s integer,
    filtr char(80),
    trideni char(30),
    vazba_pomer integer,
    zuzena_sest integer,
    komp_model integer,
    tisk_pod_sebe integer,
    pouzivano integer,
    omezeni_editace char(4),
    filtr_portal char(80),
    pro_podniky char(50),
    poradi_sestava integer,
    napln_prace integer
  );
revoke all on "mzdy".atributy from "public";

{ TABLE "mzdy".bank_spoj row size = 0 number of columns = 25 index size = 0 }
{ unload file name = bank_spoj.unl number of rows = 1 }
create table "mzdy".bank_spoj 
  (
    id integer not null,
    id_bank_spoj integer not null,
    dat_od date not null,
    dat_do date,
    nazev char(20),
    poradi integer,
    id_osoby integer,
    typ char(2) not null,
    os_cislo decimal(10,0),
    cislo_banky char(4) not null,
    cislo_uctu char(20) not null,
    konst_symb char(4),
    var_symb char(10),
    spec_symb char(10),
    swift char(11),
    iban char(28),
    nazev_pobocky char(30),
    cerpat char(1),
    cislo_klienta char(10),
    ident char(4),
    z_intervalu integer,
    k_intervalu integer,
    p_kod char(6),
    c_pobocky char(4),
    pobocka integer
  );
revoke all on "mzdy".bank_spoj from "public";

create  index "mzdy".ix_id_bspoj on "mzdy".bank_spoj (id_bank_spoj);
create  index "mzdy".ix_id_bspoj2 on "mzdy".bank_spoj (id_bank_spoj, dat_od);
{ TABLE "mzdy".archiv_pis row size = 0 number of columns = 9 index size = 0 }
{ unload file name = archiv_pis.unl number of rows = 0 }
create table "mzdy".archiv_pis 
  (
    uzivatel char(64),
    tabulka char(18) not null,
    vyznam char(18) not null,
    os_cislo decimal(10,0),
    klic char(40),
    stare char(50),
    nove char(50),
    datum date not null,
    cas char(8)
  );
revoke all on "mzdy".archiv_pis from "public";

create  index "mzdy".ix_arch_pis on "mzdy".archiv_pis (tabulka, vyznam);
{ TABLE "mzdy".archiv_hlas_zp row size = 0 number of columns = 11 index size = 0 }
{ unload file name = archiv_hlas_zp.unl number of rows = 1663 }
create table "mzdy".archiv_hlas_zp 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    c_pojist char(10) not null,
    dat_nast date not null,
    dat_vyst date,
    kod char(4),
    datum date,
    cis_zp integer not null,
    vznik date not null,
    ind char(1),
    uzivatel char(64)
  );
revoke all on "mzdy".archiv_hlas_zp from "public";

create unique  index "mzdy".ix_arhl on "mzdy".archiv_hlas_zp (id);
{ TABLE "mzdy".archiv row size = 0 number of columns = 11 index size = 0 }
{ unload file name = archiv.unl number of rows = 4079 }
create table "mzdy".archiv 
  (
    uzivatel char(64),
    tabulka char(18) not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    vyznam char(18) not null,
    stare char(50),
    nove char(50),
    datum date not null,
    cas char(8),
    v_obdobi date,
    datum_zapisu date
  );
revoke all on "mzdy".archiv from "public";

create  index "mzdy".ix_arch on "mzdy".archiv (os_cislo, tabulka, datum);
create  index "mzdy".ix_arch3 on "mzdy".archiv (tabulka, vyznam, datum, cas);
create  index "mzdy".ix_arch4 on "mzdy".archiv (vyznam, tabulka, datum, stare, nove);
{ TABLE "mzdy".appaudit row size = 0 number of columns = 8 index size = 0 }
{ unload file name = appaudit.unl number of rows = 0 }
create table "mzdy".appaudit 
  (
    uzivatel char(64) not null,
    stanice char(80) not null,
    objekt char(300) not null,
    akce char(1) not null,
    datum date not null,
    cas char(9) not null,
    popis char(64),
    klic char(64)
  );
revoke all on "mzdy".appaudit from "public";

{ TABLE "mzdy".archpla row size = 0 number of columns = 11 index size = 0 }
{ unload file name = archpla.unl number of rows = 0 }
create table "mzdy".archpla 
  (
    os_cislo decimal(10,0) not null,
    kod integer,
    c_dokladu integer,
    vyznam char(10),
    cislo_platby char(15),
    cislo_banky char(15),
    kod_zmeny integer,
    stare char(20),
    nove char(20),
    vznik date,
    datum date
  );
revoke all on "mzdy".archpla from "public";

create  index "mzdy".ix_arpl on "mzdy".archpla (os_cislo);
{ TABLE "mzdy".archiv_vystupu row size = 0 number of columns = 11 index size = 0 }
{ unload file name = archiv_vystupu.unl number of rows = 7494 }
create table "mzdy".archiv_vystupu 
  (
    id integer,
    cis_radku integer,
    datum date not null,
    cas char(8),
    uzivatel char(64),
    priznak char(1),
    popis char(250) not null,
    session_id integer not null,
    itech char(1),
    cislo_sestavy char(12),
    dataobjekt char(42)
  );
revoke all on "mzdy".archiv_vystupu from "public";

{ TABLE "mzdy".archiv_vl_notif row size = 0 number of columns = 11 index size = 0 }
{ unload file name = archiv_vl_notif.unl number of rows = 22349 }
create table "mzdy".archiv_vl_notif 
  (
    id_vl integer not null,
    id_notif integer not null,
    typ integer not null,
    os_cislo decimal(10,0) not null,
    obdobi date not null,
    adresa char(250),
    clog integer,
    tlog char(250),
    datum date not null,
    cas char(18) not null,
    uzivatel char(64) not null
  );
revoke all on "mzdy".archiv_vl_notif from "public";

{ TABLE "mzdy".archiv_vl_blob row size = 0 number of columns = 2 index size = 0 }
{ unload file name = archiv_vl_blob.unl number of rows = 0 }
create table "mzdy".archiv_vl_blob 
  (
    id_vl integer not null,
    informace byte
  );
revoke all on "mzdy".archiv_vl_blob from "public";

{ TABLE "mzdy".archiv_vl row size = 0 number of columns = 16 index size = 0 }
{ unload file name = archiv_vl.unl number of rows = 502 }
create table "mzdy".archiv_vl 
  (
    id integer not null,
    obdobi date not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    titul char(25),
    jmeno char(40),
    prijmeni char(40),
    kmen_str char(10),
    vypl_str integer,
    tisk char(1),
    code_page char(10) not null,
    zip integer,
    cislo integer,
    datum date not null,
    cas char(8) not null,
    uzivatel char(64) not null
  );
revoke all on "mzdy".archiv_vl from "public";

create  index "mzdy".i_archivvl on "mzdy".archiv_vl (obdobi, os_cislo, cislo_pom);
{ TABLE "mzdy".akce_osnovy row size = 0 number of columns = 4 index size = 0 }
{ unload file name = akce_osnovy.unl number of rows = 3 }
create table "mzdy".akce_osnovy 
  (
    id integer not null,
    nazev char(40) not null,
    bod_cislo integer not null,
    bod_popis char(80)
  );
revoke all on "mzdy".akce_osnovy from "public";

{ TABLE "mzdy".akce_ucast row size = 0 number of columns = 20 index size = 0 }
{ unload file name = akce_ucast.unl number of rows = 230 }
create table "mzdy".akce_ucast 
  (
    p_cislo integer not null,
    os_cislo decimal(10,0) not null,
    predpokl_cena decimal(16,2),
    zdroj char(1),
    por_prihlaseni integer,
    dat_prihlaseni date,
    hodnoc_lektora decimal(4,2),
    naklady decimal(16,2),
    naklady_ost decimal(16,2),
    vyhodnoc_ucast char(1),
    vyhodnoc_datum date,
    poznamka char(40),
    certifikat char(20),
    provereni_ucin decimal(4,2),
    provereni_zpusob char(1),
    provereni_datum date,
    odesl_pozvanka char(20),
    odesl_vyzva_khodn char(20),
    id_ext_vazby integer,
    prezence_kdy char(19)
  );
revoke all on "mzdy".akce_ucast from "public";

create unique  index "mzdy".ix_akce_ucast on "mzdy".akce_ucast (p_cislo, os_cislo, vyhodnoc_ucast);
create  index "mzdy".ix_akce_ucast2 on "mzdy".akce_ucast (p_cislo, vyhodnoc_ucast);
{ TABLE "mzdy".akce_zahl row size = 0 number of columns = 42 index size = 0 }
{ unload file name = akce_zahl.unl number of rows = 12 }
create table "mzdy".akce_zahl 
  (
    p_cislo integer not null,
    nazev char(100),
    dat_od date,
    dat_do date,
    hodina char(5),
    lektor integer,
    ucebna char(70),
    id_tabul integer,
    pro_co char(10) not null,
    ind_list char(1),
    hodina_do char(5),
    predpl_nakl decimal(16,2),
    poznamka char(100),
    typ char(7),
    termin_do date,
    suma_hodin decimal(5,2),
    skolitel char(80),
    max_pocet integer,
    stred char(10),
    akreditace_cislo char(30),
    celkem_dnu decimal(5,1),
    cislo_akce char(12),
    datum_platby date,
    verejna integer,
    povol_zadost integer,
    systyp_akce char(2),
    nadriz_p_cislo integer,
    kod_planu char(10),
    prizn_r01 integer,
    prizn_r02 integer,
    prizn_r03 integer,
    prizn_r04 integer,
    prizn_r05 integer,
    prizn_r06 integer,
    prizn_r07 integer,
    prizn_r08 integer,
    p_cislo_skupiny integer,
    typ_akreditace char(7),
    cis_objednavky char(20),
    zotp_osoba char(40),
    realiz_poznamka char(80),
    id_podniku integer
  );
revoke all on "mzdy".akce_zahl from "public";

create  index "mzdy".ix_akcezahl_date on "mzdy".akce_zahl (dat_od, dat_do, termin_do);
create  index "mzdy".ix_akcezahl_osve on "mzdy".akce_zahl (pro_co, dat_od, dat_do);
{ TABLE "mzdy".akce_lektori row size = 0 number of columns = 4 index size = 0 }
{ unload file name = akce_lektori.unl number of rows = 0 }
create table "mzdy".akce_lektori 
  (
    p_cislo integer not null,
    lektor integer not null,
    hodnoceni integer,
    poradi integer
  );
revoke all on "mzdy".akce_lektori from "public";

{ TABLE "mzdy".akce_druhy_nakl row size = 0 number of columns = 4 index size = 0 }
{ unload file name = akce_druhy_nakl.unl number of rows = 2 }
create table "mzdy".akce_druhy_nakl 
  (
    druh_nakladu char(10) not null,
    druh_nakladu_text char(60),
    system_druh integer not null,
    vychozi_sysdruh integer not null
  );
revoke all on "mzdy".akce_druhy_nakl from "public";

create unique  index "mzdy".ix_akcedruhnakl on "mzdy".akce_druhy_nakl (druh_nakladu);
{ TABLE "mzdy".akce_dokumenty row size = 0 number of columns = 9 index size = 0 }
{ unload file name = akce_dokumenty.unl number of rows = 2 }
create table "mzdy".akce_dokumenty 
  (
    id integer not null,
    p_cislo integer not null,
    typ_dokumentu char(7) not null,
    poznamka char(50),
    datum date,
    cesta_soubor char(200),
    nazev_soubor char(100),
    id_blob integer,
    sdilene_uloziste char(150)
  );
revoke all on "mzdy".akce_dokumenty from "public";

{ TABLE "mzdy".akce_dalsi_osve row size = 0 number of columns = 2 index size = 0 }
{ unload file name = akce_dalsi_osve.unl number of rows = 0 }
create table "mzdy".akce_dalsi_osve 
  (
    p_cislo integer not null,
    cis_osve char(10) not null
  );
revoke all on "mzdy".akce_dalsi_osve from "public";

{ TABLE "mzdy".absence row size = 0 number of columns = 34 index size = 0 }
{ unload file name = absence.unl number of rows = 4382 }
create table "mzdy".absence 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    kod integer not null,
    c_dokladu integer not null,
    dat_od date not null,
    dat_do date,
    dny decimal(3,1),
    hodiny decimal(5,2),
    hrub_prum decimal(16,2),
    vypoc_prum decimal(16,2),
    zpet_propl char(1),
    datum date not null,
    cis_rozhod_ext char(20),
    dny2 decimal(5,1),
    ind_prum char(1),
    uzivatel char(64),
    pokr_abs char(1),
    zdroj char(1),
    davka integer,
    hodiny_posl decimal(5,2),
    dny3 decimal(5,1),
    poznamka char(60),
    dny_nahr decimal(3,1),
    hodiny_nahr decimal(5,2),
    umyslna char(1),
    dat_pom date,
    prizn1 char(1),
    skut_dat_od date,
    id_poz integer,
    placene_ocr char(1),
    pandemie char(1),
    izolacka char(1),
    nova_abs char(1),
    otc_jako_rd char(1)
  );
revoke all on "mzdy".absence from "public";

create  index "mzdy".ix_abs on "mzdy".absence (os_cislo, datum);
create  index "mzdy".ix_abs_cd on "mzdy".absence (c_dokladu);
create  index "mzdy".ix_abs_idp on "mzdy".absence (id_poz);
{ TABLE "mzdy".absence_otcovska row size = 0 number of columns = 3 index size = 0 }
{ unload file name = absence_otcovska.unl number of rows = 0 }
create table "mzdy".absence_otcovska 
  (
    c_dokladu integer not null,
    dat_zam date,
    hod_zam decimal(5,2) not null
  );
revoke all on "mzdy".absence_otcovska from "public";

create  index "mzdy".ix_abs_otcovska on "mzdy".absence_otcovska (c_dokladu);
{ TABLE "mzdy".adresati_datovky row size = 0 number of columns = 5 index size = 0 }
{ unload file name = adresati_datovky.unl number of rows = 0 }
create table "mzdy".adresati_datovky 
  (
    id_podniku integer not null,
    kod_vykazu char(20) not null,
    id_osoby integer,
    datova_schranka char(7),
    vsechny_podniky integer
  );
revoke all on "mzdy".adresati_datovky from "public";

{ TABLE "mzdy".abs_dokl row size = 0 number of columns = 19 index size = 0 }
{ unload file name = abs_dokl.unl number of rows = 4117 }
create table "mzdy".abs_dokl 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    posledni char(1) not null,
    skup_str integer,
    por_cis integer not null,
    mesic integer not null,
    rok integer not null,
    uziv_doklad char(10),
    indikace char(10),
    ind_narok_znm integer,
    id_podniku integer,
    priloha_datum date,
    uzivatel char(64),
    pril_datum_hzupn date,
    uzivatel_hzupn char(64),
    pril_datum_zzvdpn date,
    uzivatel_zzvdpn char(64),
    upr_dat_konce_pd date
  );
revoke all on "mzdy".abs_dokl from "public";

create unique  index "mzdy".ix_id on "mzdy".abs_dokl (id);
create  index "mzdy".ix_abs_skup_str on "mzdy".abs_dokl (skup_str, posledni, rok, mesic);
{ TABLE "mzdy".abs_dny_kc_tem row size = 0 number of columns = 9 index size = 0 }
{ unload file name = abs_dny_kc_tem.unl number of rows = 241 }
create table "mzdy".abs_dny_kc_tem 
  (
    db_user char(64) not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    dny_ro integer not null,
    kc_nem decimal(16,2) not null,
    datum date not null,
    old_kc_nem decimal(16,2),
    dny_ro_nv integer,
    dny_ro_opr integer
  );
revoke all on "mzdy".abs_dny_kc_tem from "public";

create unique  index "mzdy".ix_abs_dny_primt on "mzdy".abs_dny_kc_tem (db_user, os_cislo, cislo_pom, datum);
create  index "mzdy".ix_abs_dnyt on "mzdy".abs_dny_kc_tem (os_cislo, datum);
{ TABLE "mzdy".abs_dny_kc_obd row size = 0 number of columns = 8 index size = 0 }
{ unload file name = abs_dny_kc_obd.unl number of rows = 150506 }
create table "mzdy".abs_dny_kc_obd 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    dny_ro integer not null,
    kc_nem decimal(16,2) not null,
    datum date not null,
    old_kc_nem decimal(16,2),
    dny_ro_nv integer,
    dny_ro_opr integer
  );
revoke all on "mzdy".abs_dny_kc_obd from "public";

create unique  index "mzdy".ix_abs_dny_prim on "mzdy".abs_dny_kc_obd (os_cislo, cislo_pom, datum);
create  index "mzdy".ix_abs_dny on "mzdy".abs_dny_kc_obd (os_cislo, datum);
{ TABLE "mzdy".abs_zkus_doba row size = 0 number of columns = 8 index size = 0 }
{ unload file name = abs_zkus_doba.unl number of rows = 0 }
create table "mzdy".abs_zkus_doba 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    kod integer,
    plati_od date,
    plati_do date,
    hodiny decimal(5,2),
    zapoct_dny integer,
    poznamka char(60)
  );
revoke all on "mzdy".abs_zkus_doba from "public";

create  index "mzdy".ix_abs_zkus_doba on "mzdy".abs_zkus_doba (os_cislo);
{ TABLE "mzdy".akce_obsah row size = 0 number of columns = 3 index size = 0 }
{ unload file name = akce_obsah.unl number of rows = 8 }
create table "mzdy".akce_obsah 
  (
    p_cislo integer not null,
    bod_cislo integer not null,
    bod char(80)
  );
revoke all on "mzdy".akce_obsah from "public";

{ TABLE "mzdy".akce_naklady row size = 0 number of columns = 8 index size = 0 }
{ unload file name = akce_naklady.unl number of rows = 1 }
create table "mzdy".akce_naklady 
  (
    id integer not null,
    p_cislo integer not null,
    os_cislo decimal(10,0) not null,
    druh_nakladu char(10) not null,
    naklady decimal(16,2),
    cislo_dokladu char(15),
    id_fondu integer,
    poznamka char(40)
  );
revoke all on "mzdy".akce_naklady from "public";

create  index "mzdy".ix_sko_nakl_pcis on "mzdy".akce_naklady (p_cislo, os_cislo, druh_nakladu, naklady);
create  index "mzdy".ix_sko_nakl_pcis2 on "mzdy".akce_naklady (p_cislo, naklady, os_cislo);
create  index "mzdy".ix_sko_nakl_fond on "mzdy".akce_naklady (id_fondu, p_cislo, naklady);
create  index "mzdy".ix_sko_nakl_fond2 on "mzdy".akce_naklady (id_fondu, naklady);
{ TABLE "mzdy".cest_nahr row size = 0 number of columns = 12 index size = 0 }
{ unload file name = cest_nahr.unl number of rows = 0 }
create table "mzdy".cest_nahr 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    zaloha decimal(16,2) not null,
    citycard decimal(16,2) not null,
    naklady decimal(16,2) not null,
    datum date,
    dat_od date,
    cil char(80),
    stred char(10),
    odeslano integer,
    dat_odeslani date
  );
revoke all on "mzdy".cest_nahr from "public";

{ TABLE "mzdy".certifikaty row size = 0 number of columns = 10 index size = 0 }
{ unload file name = certifikaty.unl number of rows = 0 }
create table "mzdy".certifikaty 
  (
    id_certifikatu integer not null,
    ucel char(100),
    system_ucel integer,
    id_podniku integer,
    uzivatel char(64),
    nazev char(100),
    store_name char(25),
    store_location char(15),
    otisk char(40),
    expirace char(19)
  );
revoke all on "mzdy".certifikaty from "public";

create  index "mzdy".ix_certifik_uziv on "mzdy".certifikaty (uzivatel, id_podniku);
{ TABLE "mzdy".cerpani_mp_upr row size = 0 number of columns = 7 index size = 0 }
{ unload file name = cerpani_mp_upr.unl number of rows = 0 }
create table "mzdy".cerpani_mp_upr 
  (
    id_par integer not null,
    id_zazn integer not null,
    castka decimal(16,2),
    poznamka char(80),
    datum date,
    cas char(8),
    uzivatel char(64)
  );
revoke all on "mzdy".cerpani_mp_upr from "public";

{ TABLE "mzdy".cerpani_mp row size = 0 number of columns = 14 index size = 0 }
{ unload file name = cerpani_mp.unl number of rows = 0 }
create table "mzdy".cerpani_mp 
  (
    id_zazn integer not null,
    rok integer not null,
    sp_oz char(1) not null,
    usek char(10),
    soj_fd char(10) not null,
    kod integer not null,
    kod_rozl integer not null,
    nazev char(40),
    typ_rozh char(7),
    vych_limit decimal(16,2),
    uprava decimal(16,2),
    cerpani decimal(16,2),
    cerpani_posl_mes decimal(16,2),
    cely_urad char(1)
  );
revoke all on "mzdy".cerpani_mp from "public";

create unique  index "mzdy".ix_cerp_mp_upr on "mzdy".cerpani_mp (rok, sp_oz, soj_fd, kod, kod_rozl);
{ TABLE "mzdy".ciselnik_poradi row size = 0 number of columns = 3 index size = 0 }
{ unload file name = ciselnik_poradi.unl number of rows = 0 }
create table "mzdy".ciselnik_poradi 
  (
    kod integer not null,
    dok integer not null,
    zakaz integer not null
  );
revoke all on "mzdy".ciselnik_poradi from "public";

{ TABLE "mzdy".cis_zpracovatel row size = 0 number of columns = 6 index size = 0 }
{ unload file name = cis_zpracovatel.unl number of rows = 0 }
create table "mzdy".cis_zpracovatel 
  (
    kod char(7) not null,
    vyznam char(80),
    mzdy integer,
    pers integer,
    os_cislo decimal(10,0),
    kontakt char(50)
  );
revoke all on "mzdy".cis_zpracovatel from "public";

{ TABLE "mzdy".cis_ziv_poj row size = 0 number of columns = 12 index size = 0 }
{ unload file name = cis_ziv_poj.unl number of rows = 0 }
create table "mzdy".cis_ziv_poj 
  (
    cislo integer not null,
    nazev char(40) not null,
    zkratka char(12) not null,
    ic_poj char(8),
    cislo_banky char(4),
    cislo_platby char(20),
    konst_symb char(4),
    var_symb char(10),
    spec_symb char(10),
    kod_prisp char(20),
    kod_srazka char(20),
    proc_prisp decimal(5,1)
  );
revoke all on "mzdy".cis_ziv_poj from "public";

{ TABLE "mzdy".cis_zakazky row size = 0 number of columns = 8 index size = 0 }
{ unload file name = cis_zakazky.unl number of rows = 0 }
create table "mzdy".cis_zakazky 
  (
    id integer not null,
    cislo char(24) not null,
    nazev char(100),
    id_skup char(1) not null,
    skupina char(10),
    dat_od date,
    dat_do date,
    id_projekt integer
  );
revoke all on "mzdy".cis_zakazky from "public";

create  index "mzdy".ix_cis_zak_ids on "mzdy".cis_zakazky (id_skup);
create  index "mzdy".ix_cis_zak_cis on "mzdy".cis_zakazky (cislo);
{ TABLE "mzdy".cis_vyjvzd row size = 0 number of columns = 5 index size = 0 }
{ unload file name = cis_vyjvzd.unl number of rows = 0 }
create table "mzdy".cis_vyjvzd 
  (
    kod char(7) not null,
    vyjimka char(20) not null,
    popis char(120),
    platnost_od date,
    platnost_do date
  );
revoke all on "mzdy".cis_vyjvzd from "public";

{ TABLE "mzdy".ciselnik row size = 0 number of columns = 31 index size = 0 }
{ unload file name = ciselnik.unl number of rows = 329 }
create table "mzdy".ciselnik 
  (
    kod integer not null,
    vyznam char(14) not null,
    cis_alg integer,
    zdaneni integer not null,
    nahr_dny char(1) not null,
    zap_dov char(3) not null,
    zap_zdrav char(1) not null,
    zap_soc char(1) not null,
    ind_abs char(1),
    kod_uzi integer,
    sys_kod char(1) not null,
    typ_slozky integer,
    kod_uc integer,
    kod_uc2 integer,
    kod_uc3 integer,
    zapoc_hruba integer,
    zapoc_cista integer,
    dny_dov char(1),
    cis_alg2 integer,
    dok integer not null,
    zakaz_vl char(1),
    operace char(1),
    max_castka decimal(16,2),
    zaokr char(1),
    rozpad integer,
    podminka char(30),
    popis char(60),
    group_vl char(1),
    jednotka_sazby integer,
    definice1 char(250),
    definice2 char(250)
  );
revoke all on "mzdy".ciselnik from "public";

{ TABLE "mzdy".dopln_ciselnik row size = 0 number of columns = 2 index size = 0 }
{ unload file name = dopln_ciselnik.unl number of rows = 0 }
create table "mzdy".dopln_ciselnik 
  (
    kod char(10) not null,
    vyznam char(100)
  );
revoke all on "mzdy".dopln_ciselnik from "public";

{ TABLE "mzdy".ex_prevody row size = 0 number of columns = 18 index size = 0 }
{ unload file name = ex_prevody.unl number of rows = 0 }
create table "mzdy".ex_prevody 
  (
    c_radku integer not null,
    vyber_podm char(100),
    cislo_banky char(4),
    cislo_uctu char(20),
    swift char(11),
    iban char(28),
    nazev_spol_pr char(20),
    var_symb char(10),
    konst_symb char(4),
    spec_symb char(10),
    odkud integer,
    castka decimal(16,2),
    akce_castka integer,
    vyber_pobocka char(20),
    akce integer not null,
    uctovani char(20),
    datum date not null,
    id_podniku integer not null
  );
revoke all on "mzdy".ex_prevody from "public";

create unique  index "mzdy".ixexpr_1 on "mzdy".ex_prevody (c_radku);
create  index "mzdy".ixexpr_2 on "mzdy".ex_prevody (datum);
{ TABLE "mzdy".ex_absence row size = 0 number of columns = 9 index size = 0 }
{ unload file name = ex_absence.unl number of rows = 0 }
create table "mzdy".ex_absence 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    kod integer,
    dat_od date,
    dat_do date,
    dny decimal(3,1),
    hodiny decimal(5,2),
    zdroj char(1),
    id_poz integer
  );
revoke all on "mzdy".ex_absence from "public";

create  index "mzdy".ix_exabs on "mzdy".ex_absence (os_cislo, cislo_pom);
create unique  index "mzdy".ix_exabs1 on "mzdy".ex_absence (id_poz, dat_od);
{ TABLE "mzdy".ev_p_prisp row size = 0 number of columns = 15 index size = 0 }
{ unload file name = ev_p_prisp.unl number of rows = 0 }
create table "mzdy".ev_p_prisp 
  (
    os_cislo decimal(10,0) not null,
    fond integer not null,
    c_smlouvy char(15),
    varianta integer,
    indik char(1) not null,
    castka decimal(16,2),
    navyseni decimal(16,2),
    indik_zamec char(1),
    castka_zamec decimal(16,2),
    popis char(50),
    dat_od date,
    dat_do date,
    perioda integer,
    id integer not null,
    datum_uzav_sml date
  );
revoke all on "mzdy".ev_p_prisp from "public";

create unique  index "mzdy".ix_ev_p_prisp on "mzdy".ev_p_prisp (id);
{ TABLE "mzdy".epodani_stavy row size = 0 number of columns = 6 index size = 0 }
{ unload file name = epodani_stavy.unl number of rows = 0 }
create table "mzdy".epodani_stavy 
  (
    id_stavu integer not null,
    typ_zpravy char(32) not null,
    datum date not null,
    cas char(15) not null,
    id_podani char(32) not null,
    id_info_blob integer not null
  );
revoke all on "mzdy".epodani_stavy from "public";

{ TABLE "mzdy".epodani row size = 0 number of columns = 14 index size = 0 }
{ unload file name = epodani.unl number of rows = 0 }
create table "mzdy".epodani 
  (
    id_podani char(32) not null,
    cssz_id char(32),
    id_podniku integer not null,
    datum date not null,
    typ char(12) not null,
    etype char(20),
    soubor char(128),
    testovaci integer not null,
    aktivni integer not null,
    id_info_blob integer not null,
    cas_podani char(12),
    id_certifikatu integer,
    poznamka char(50),
    uzivatel char(64)
  );
revoke all on "mzdy".epodani from "public";

{ TABLE "mzdy".hrp_nastaveni row size = 0 number of columns = 7 index size = 0 }
{ unload file name = hrp_nastaveni.unl number of rows = 0 }
create table "mzdy".hrp_nastaveni 
  (
    zalozka integer not null,
    polozka char(3) not null,
    hodnota char(50),
    logik char(1),
    polozka2 char(3),
    hodnota2 char(50),
    parametry char(400)
  );
revoke all on "mzdy".hrp_nastaveni from "public";

{ TABLE "mzdy".hrp_buff2 row size = 0 number of columns = 24 index size = 0 }
{ unload file name = hrp_buff2.unl number of rows = 33479 }
create table "mzdy".hrp_buff2 
  (
    id integer not null,
    cislo_platby char(20),
    cislo_banky char(4),
    stat char(2) not null,
    var_symb char(10),
    konst_symb char(4),
    spec_symb char(10),
    swift char(11),
    iban char(28),
    z_uctu integer,
    castka decimal(16,2) not null,
    kod integer,
    os_cislo decimal(10,0),
    cislo_pom integer,
    popis char(50),
    jmeno char(100),
    hromad integer not null,
    druh integer not null,
    c_radku integer,
    pobocka integer,
    doplnkova_1 char(10),
    zprac integer not null,
    id_podniku integer not null,
    datum date not null
  );
revoke all on "mzdy".hrp_buff2 from "public";

create  index "mzdy".ix_hrp_buff2 on "mzdy".hrp_buff2 (datum);
{ TABLE "mzdy".hrub_vydel row size = 0 number of columns = 7 index size = 0 }
{ unload file name = hrub_vydel.unl number of rows = 0 }
create table "mzdy".hrub_vydel 
  (
    os_cislo decimal(10,0),
    rok integer,
    doba integer,
    ndny integer,
    doba_sl integer,
    prijem decimal(16,2),
    prep_prij decimal(16,2)
  );
revoke all on "mzdy".hrub_vydel from "public";

{ TABLE "mzdy".hz_hod_pol row size = 0 number of columns = 13 index size = 0 }
{ unload file name = hz_hod_pol.unl number of rows = 0 }
create table "mzdy".hz_hod_pol 
  (
    id integer not null,
    idp integer not null,
    pc integer not null,
    pozadavek char(7),
    body_poz integer,
    body_obd integer,
    zdroj integer not null,
    sta_edt integer not null,
    os_cislo decimal(10,0),
    flag1 integer,
    poznamka char(250),
    id_poznamky integer,
    vaha integer not null
  );
revoke all on "mzdy".hz_hod_pol from "public";

create  index "mzdy".ix_hz_hod_pol on "mzdy".hz_hod_pol (idp, sta_edt, body_obd);
create unique  index "mzdy".ix_hz_hod_pol1 on "mzdy".hz_hod_pol (idp, sta_edt, pozadavek);
{ TABLE "mzdy".hz_hod_mot row size = 0 number of columns = 7 index size = 0 }
{ unload file name = hz_hod_mot.unl number of rows = 0 }
create table "mzdy".hz_hod_mot 
  (
    idp integer not null,
    pc integer not null,
    pozadavek integer not null,
    popis char(64),
    poznamka char(250),
    stanovisko integer,
    termin date
  );
revoke all on "mzdy".hz_hod_mot from "public";

{ TABLE "mzdy".hz_hod_hla row size = 0 number of columns = 34 index size = 0 }
{ unload file name = hz_hod_hla.unl number of rows = 0 }
create table "mzdy".hz_hod_hla 
  (
    id integer not null,
    id_ha integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    stredisko char(10),
    prac_str char(10),
    id_pracmista integer,
    obdobi_od date,
    obdobi_do date,
    hodnotil decimal(10,0),
    schvalil decimal(10,0),
    datum date,
    perioda integer,
    cis_kat integer,
    skupina integer,
    zdroj_ppm integer,
    zdroj_ind integer,
    zdroj_tex integer,
    obeznamen integer,
    d_obeznamen date,
    souhlasil integer,
    d_souhlasil date,
    zamknuto integer,
    datum_hodnoceni date,
    datum_pred_hodn date,
    druh_hodnoceni integer,
    duvod_zpracovani integer,
    personalni_rezerva integer,
    hod_pro_slu_mis integer,
    jiny_duvod char(250),
    duverne integer,
    id_ap integer,
    zaver integer,
    cislo_jednaci char(32)
  );
revoke all on "mzdy".hz_hod_hla from "public";

create  index "mzdy".x_hz_hod_hla on "mzdy".hz_hod_hla (os_cislo, cislo_pom);
create  index "mzdy".x_hz_hod_hl1 on "mzdy".hz_hod_hla (id, zamknuto);
create  index "mzdy".x_hz_hod_hl2 on "mzdy".hz_hod_hla (id_ha, zamknuto);
create  index "mzdy".x_hz_hod_hl3 on "mzdy".hz_hod_hla (id, id_ha, id_ap);
{ TABLE "mzdy".hz_hod_dol row size = 0 number of columns = 6 index size = 0 }
{ unload file name = hz_hod_dol.unl number of rows = 0 }
create table "mzdy".hz_hod_dol 
  (
    idp integer not null,
    pc integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    sta_edt integer,
    datum date
  );
revoke all on "mzdy".hz_hod_dol from "public";

{ TABLE "mzdy".hz_hod_cil row size = 0 number of columns = 19 index size = 0 }
{ unload file name = hz_hod_cil.unl number of rows = 0 }
create table "mzdy".hz_hod_cil 
  (
    id integer not null,
    idp integer not null,
    druh integer not null,
    pc integer not null,
    sta_edt integer not null,
    cil integer not null,
    text char(250),
    vaha integer,
    hodnoceni integer,
    zdroj integer not null,
    termin date,
    hodnota decimal(12,2),
    poznamka char(250),
    ocek_vystup char(250),
    id_poznamky integer,
    id_kroky integer,
    id_ocek_vystup integer,
    datum date not null,
    editor char(250)
  );
revoke all on "mzdy".hz_hod_cil from "public";

create  index "mzdy".ix_hz_cil on "mzdy".hz_hod_cil (idp, druh);
{ TABLE "mzdy".katalog_povolani row size = 0 number of columns = 3 index size = 0 }
{ unload file name = katalog_povolani.unl number of rows = 0 }
create table "mzdy".katalog_povolani 
  (
    verze integer not null,
    kod char(9) not null,
    nazev char(150) not null
  );
revoke all on "mzdy".katalog_povolani from "public";

{ TABLE "mzdy".kar_rezerv row size = 0 number of columns = 3 index size = 0 }
{ unload file name = kar_rezerv.unl number of rows = 0 }
create table "mzdy".kar_rezerv 
  (
    os_cislo decimal(10,0) not null,
    funkce char(10) not null,
    ident integer
  );
revoke all on "mzdy".kar_rezerv from "public";

create  index "mzdy".ix_kar_rezerv on "mzdy".kar_rezerv (os_cislo, funkce);
{ TABLE "mzdy".kar_pozadav row size = 0 number of columns = 4 index size = 0 }
{ unload file name = kar_pozadav.unl number of rows = 0 }
create table "mzdy".kar_pozadav 
  (
    os_cislo decimal(10,0) not null,
    pozadav char(10) not null,
    ident integer,
    akce_id integer
  );
revoke all on "mzdy".kar_pozadav from "public";

create  index "mzdy".ix_kar_pozadav on "mzdy".kar_pozadav (os_cislo, pozadav);
{ TABLE "mzdy".kalendar_plan_zam row size = 0 number of columns = 3 index size = 0 }
{ unload file name = kalendar_plan_zam.unl number of rows = 0 }
create table "mzdy".kalendar_plan_zam 
  (
    id integer not null,
    id_kal integer not null,
    os_cislo decimal(10,0) not null
  );
revoke all on "mzdy".kalendar_plan_zam from "public";

create  index "mzdy".ix_kalpz1 on "mzdy".kalendar_plan_zam (id_kal, os_cislo);
{ TABLE "mzdy".kalendar_plan_atr row size = 0 number of columns = 4 index size = 0 }
{ unload file name = kalendar_plan_atr.unl number of rows = 0 }
create table "mzdy".kalendar_plan_atr 
  (
    id integer not null,
    id_kal integer not null,
    klic char(20) not null,
    hodnota char(500)
  );
revoke all on "mzdy".kalendar_plan_atr from "public";

create  index "mzdy".ix_kalatr1 on "mzdy".kalendar_plan_atr (id_kal);
create unique  index "mzdy".ix_kalatr2 on "mzdy".kalendar_plan_atr (id_kal, klic);
{ TABLE "mzdy".kalendar_plan row size = 0 number of columns = 17 index size = 0 }
{ unload file name = kalendar_plan.unl number of rows = 0 }
create table "mzdy".kalendar_plan 
  (
    id integer not null,
    guid char(36) not null,
    kalendar char(10) not null,
    id_pozadavku integer,
    stav char(1),
    cas_od char(19) not null,
    cas_do char(19) not null,
    subject char(1000) not null,
    description_id integer,
    color char(7),
    allow_delete integer not null,
    allow_edit integer not null,
    rec_rule char(255),
    rec_parent_guid char(36),
    reminder char(255),
    zmeneno char(19) not null,
    zmenil decimal(10,0) not null
  );
revoke all on "mzdy".kalendar_plan from "public";

create unique  index "mzdy".ix_kalp1 on "mzdy".kalendar_plan (guid);
create  index "mzdy".ix_kalp3 on "mzdy".kalendar_plan (id, cas_od, cas_do, kalendar, id_pozadavku, stav);
{ TABLE "mzdy".kalendar_export row size = 0 number of columns = 5 index size = 0 }
{ unload file name = kalendar_export.unl number of rows = 0 }
create table "mzdy".kalendar_export 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    export integer,
    dat_zmeny date,
    typ_agendy char(1)
  );
revoke all on "mzdy".kalendar_export from "public";

{ TABLE "mzdy".kalendar row size = 0 number of columns = 4 index size = 0 }
{ unload file name = kalendar.unl number of rows = 4748 }
create table "mzdy".kalendar 
  (
    datum date not null,
    prac_den char(1) not null,
    svatek char(1) not null,
    neprac_svatek char(1)
  );
revoke all on "mzdy".kalendar from "public";

{ TABLE "mzdy".jazyky row size = 0 number of columns = 2 index size = 0 }
{ unload file name = jazyky.unl number of rows = 15 }
create table "mzdy".jazyky 
  (
    jazyk char(10) not null,
    nazev char(40)
  );
revoke all on "mzdy".jazyky from "public";

{ TABLE "mzdy".kurzy_men row size = 0 number of columns = 4 index size = 0 }
{ unload file name = kurzy_men.unl number of rows = 0 }
create table "mzdy".kurzy_men 
  (
    datum date not null,
    kod char(3) not null,
    mnozstvi integer not null,
    kurz decimal(12,5) not null
  );
revoke all on "mzdy".kurzy_men from "public";

{ TABLE "mzdy".mzd_prostr_ur_dt row size = 0 number of columns = 28 index size = 0 }
{ unload file name = mzd_prostr_ur_dt.unl number of rows = 0 }
create table "mzdy".mzd_prostr_ur_dt 
  (
    typ integer not null,
    rok integer not null,
    id integer not null,
    mesic integer not null,
    poc_zam decimal(8,3),
    zakl decimal(16,2),
    osob decimal(16,2),
    ved decimal(16,2),
    pripl decimal(16,2),
    odm decimal(16,2),
    nahr decimal(16,2),
    kum_rozp decimal(16,2),
    kum_zam decimal(15,3),
    kum_poc decimal(16,2),
    zakl_pr decimal(16,2),
    osob_pr decimal(16,2),
    ved_pr decimal(16,2),
    pripl_pr decimal(14,2),
    odm_pr decimal(16,2),
    nahr_pr decimal(16,2),
    rozp decimal(16,2),
    rozp_sum decimal(16,2),
    oon decimal(16,2),
    zastu decimal(16,2),
    zastn decimal(16,2),
    usly decimal(16,2),
    odchod decimal(16,2),
    obcan decimal(16,2)
  );
revoke all on "mzdy".mzd_prostr_ur_dt from "public";

{ TABLE "mzdy".mzd_prostr_str_hd row size = 0 number of columns = 3 index size = 0 }
{ unload file name = mzd_prostr_str_hd.unl number of rows = 0 }
create table "mzdy".mzd_prostr_str_hd 
  (
    id_vykazu integer not null,
    nazev char(50) not null,
    var_zprac integer not null
  );
revoke all on "mzdy".mzd_prostr_str_hd from "public";

{ TABLE "mzdy".mzd_prostr_str_det row size = 0 number of columns = 8 index size = 0 }
{ unload file name = mzd_prostr_str_det.unl number of rows = 0 }
create table "mzdy".mzd_prostr_str_det 
  (
    id_vykazu integer not null,
    id_radku integer not null,
    por_radku integer not null,
    typ char(1),
    prizn1 char(1),
    nazev char(50),
    sezn_kody char(100),
    odpov_pol integer
  );
revoke all on "mzdy".mzd_prostr_str_det from "public";

{ TABLE "mzdy".mzd_prostr_par row size = 0 number of columns = 6 index size = 0 }
{ unload file name = mzd_prostr_par.unl number of rows = 0 }
create table "mzdy".mzd_prostr_par 
  (
    rok integer not null,
    id_vykazu integer not null,
    por_vykazu integer not null,
    typ_par integer not null,
    por_typ_par integer not null,
    hod_par char(50)
  );
revoke all on "mzdy".mzd_prostr_par from "public";

{ TABLE "mzdy".os_vlast row size = 0 number of columns = 7 index size = 0 }
{ unload file name = os_vlast.unl number of rows = 0 }
create table "mzdy".os_vlast 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    vlastnost char(7) not null,
    urov_pm integer,
    hodnoceni integer not null,
    datum date not null
  );
revoke all on "mzdy".os_vlast from "public";

create  index "mzdy".ix_os_vlx1 on "mzdy".os_vlast (os_cislo, cislo_pom, datum);
create  index "mzdy".ix_os_vlx on "mzdy".os_vlast (datum);
{ TABLE "mzdy".organizer row size = 0 number of columns = 8 index size = 0 }
{ unload file name = organizer.unl number of rows = 236 }
create table "mzdy".organizer 
  (
    os_cislo decimal(10,0),
    cislo_pom integer,
    operace char(1) not null,
    agenda char(30),
    datum date not null,
    cas char(6) not null,
    obdobi date not null,
    uziv char(64) not null
  );
revoke all on "mzdy".organizer from "public";

create  index "mzdy".ix_org on "mzdy".organizer (os_cislo, obdobi, operace);
{ TABLE "mzdy".plat_popl row size = 0 number of columns = 8 index size = 0 }
{ unload file name = plat_popl.unl number of rows = 0 }
create table "mzdy".plat_popl 
  (
    kod integer not null,
    castka decimal(16,2) not null,
    platce char(1),
    vyber_kod char(20),
    vyber_banka char(20),
    vyber_ucet char(20),
    vyber_misto char(20),
    vyber_castka char(40)
  );
revoke all on "mzdy".plat_popl from "public";

create  index "mzdy".ix_plat_popl1 on "mzdy".plat_popl (kod, castka);
create  index "mzdy".ix_plat_popl2 on "mzdy".plat_popl (vyber_kod, vyber_banka, vyber_ucet, vyber_misto, vyber_castka);
{ TABLE "mzdy".platby row size = 0 number of columns = 49 index size = 0 }
{ unload file name = platby.unl number of rows = 4327 }
create table "mzdy".platby 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    kod integer not null,
    c_dokladu integer not null,
    celk_castka decimal(16,2),
    zbyv_castka decimal(16,2),
    mes_castka decimal(16,2) not null,
    prech_castka decimal(16,2),
    mimor_splatka decimal(16,2),
    deponovat char(1),
    poradi integer not null,
    cislo_platby char(20),
    konst_symb char(4),
    var_symb char(10),
    spec_symb char(10),
    cislo_banky char(4),
    swift char(11),
    iban char(28),
    bank_spoj_odkud integer,
    jmeno_prij char(30),
    ulice char(45),
    misto char(48),
    psc char(5),
    spec_adresata char(10),
    ev_cislo char(100),
    poznamka char(35),
    opr_jmeno char(150),
    opr_ulice char(45),
    opr_cislo char(14),
    opr_misto char(48),
    opr_psc char(5),
    deti char(250),
    dat_doruc date,
    dat_prmoc date,
    eu_jmeno char(150),
    eu_ulice char(45),
    eu_cislo char(14),
    eu_misto char(48),
    eu_psc char(5),
    dep_odeslano date,
    dep_zaplaceno char(1),
    nahrada_zam char(1),
    dat_od date not null,
    dat_do date,
    vyp_procento decimal(3,1),
    srazit_dpp char(1),
    vychozi_ucet char(1),
    nezahrn_4exe char(1),
    svazane_c_dokl integer
  );
revoke all on "mzdy".platby from "public";

create unique  index "mzdy".ix_platby_id on "mzdy".platby (id);
create  index "mzdy".ix_platby_os_cis on "mzdy".platby (os_cislo, dat_od);
create  index "mzdy".ix_platby_c_dokl on "mzdy".platby (c_dokladu, dat_od);
{ TABLE "mzdy".pouzita_os_cisla row size = 0 number of columns = 1 index size = 0 }
{ unload file name = pouzita_os_cisla.unl number of rows = 937 }
create table "mzdy".pouzita_os_cisla 
  (
    pouzite_os_cislo decimal(10,0) not null
  );
revoke all on "mzdy".pouzita_os_cisla from "public";

create unique  index "mzdy".ix_pouzite_osc on "mzdy".pouzita_os_cisla (pouzite_os_cislo);
{ TABLE "mzdy".pouz_kurzy row size = 0 number of columns = 11 index size = 0 }
{ unload file name = pouz_kurzy.unl number of rows = 0 }
create table "mzdy".pouz_kurzy 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    agenda char(2),
    kod integer,
    den date,
    mena char(3),
    kurz decimal(16,9) not null,
    fix integer not null,
    poznamka char(30),
    datum date not null
  );
revoke all on "mzdy".pouz_kurzy from "public";

create  index "mzdy".ix_pouz_kurz_1 on "mzdy".pouz_kurzy (os_cislo, cislo_pom, datum, agenda);
create  index "mzdy".ix_pouz_kurz_2 on "mzdy".pouz_kurzy (mena, kurz);
{ TABLE "mzdy".posta_zakl row size = 0 number of columns = 18 index size = 0 }
{ unload file name = posta_zakl.unl number of rows = 0 }
create table "mzdy".posta_zakl 
  (
    datum char(4),
    por_cis integer,
    podav_cis char(6),
    banka char(4),
    predcisli char(6),
    ucet char(10),
    vs char(10),
    ks char(4),
    ss char(10),
    doba_plat date,
    zpusob_plac char(1),
    banka_saz char(4),
    predcisli_saz char(6),
    ucet_saz char(10),
    ks_saz char(4),
    pocet_vet integer,
    kody char(100),
    spec_adres integer
  );
revoke all on "mzdy".posta_zakl from "public";

{ TABLE "mzdy".poznam_id row size = 0 number of columns = 8 index size = 0 }
{ unload file name = poznam_id.unl number of rows = 212 }
create table "mzdy".poznam_id 
  (
    prog_jmeno char(14) not null,
    klic_pozn char(200),
    hlavicka char(20) not null,
    vlastnik char(64) not null,
    id_pozn integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    id_hlavickapozn integer not null
  );
revoke all on "mzdy".poznam_id from "public";

create unique  index "mzdy".ix_pozn_id on "mzdy".poznam_id (id_pozn);
create  index "mzdy".ix_pozn_id2 on "mzdy".poznam_id (prog_jmeno, klic_pozn);
create  index "mzdy".ix_pozn_id3 on "mzdy".poznam_id (prog_jmeno, hlavicka, os_cislo, cislo_pom);
create  index "mzdy".ix_pozn_id4 on "mzdy".poznam_id (os_cislo, cislo_pom, prog_jmeno, hlavicka);
{ TABLE "mzdy".poznam_prava row size = 0 number of columns = 3 index size = 0 }
{ unload file name = poznam_prava.unl number of rows = 0 }
create table "mzdy".poznam_prava 
  (
    id_pozn integer not null,
    uzivatel char(64) not null,
    prava char(5)
  );
revoke all on "mzdy".poznam_prava from "public";

create  index "mzdy".ix_pozn_prav on "mzdy".poznam_prava (id_pozn);
{ TABLE "mzdy".poznam_txt row size = 0 number of columns = 3 index size = 0 }
{ unload file name = poznam_txt.unl number of rows = 212 }
create table "mzdy".poznam_txt 
  (
    id_pozn integer not null,
    poznamka char(74),
    radek char(2) not null
  );
revoke all on "mzdy".poznam_txt from "public";

create  index "mzdy".ix_pozn_txt1 on "mzdy".poznam_txt (id_pozn);
create  index "mzdy".ix_pozn_txt2 on "mzdy".poznam_txt (id_pozn, radek);
{ TABLE "mzdy".pr_predpokl row size = 0 number of columns = 8 index size = 0 }
{ unload file name = pr_predpokl.unl number of rows = 0 }
create table "mzdy".pr_predpokl 
  (
    id integer not null,
    id_hodnoc integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    vlastnost char(7) not null,
    urov_pm integer,
    hodnoceni integer not null,
    ident integer not null
  );
revoke all on "mzdy".pr_predpokl from "public";

create  index "mzdy".ix_os_vl1 on "mzdy".pr_predpokl (os_cislo, cislo_pom, id_hodnoc);
create  index "mzdy".ix_os_vl on "mzdy".pr_predpokl (id_hodnoc);
{ TABLE "mzdy".prac_kazen row size = 0 number of columns = 7 index size = 0 }
{ unload file name = prac_kazen.unl number of rows = 0 }
create table "mzdy".prac_kazen 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    stupen integer,
    dat_poruseni date,
    dat_prevzeti date,
    poznamka char(100),
    rus_bonus char(1)
  );
revoke all on "mzdy".prac_kazen from "public";

create  index "mzdy".ix_prac_kazen on "mzdy".prac_kazen (os_cislo);
{ TABLE "mzdy".prac_mist row size = 0 number of columns = 10 index size = 0 }
{ unload file name = prac_mist.unl number of rows = 201 }
create table "mzdy".prac_mist 
  (
    id_pracmist integer not null,
    id_predka integer,
    systemovy_typ integer not null,
    cis_pracmist char(12) not null,
    naz_pracmist char(120) not null,
    datum_od date,
    datum_do date,
    id_podniku integer,
    navrh integer,
    id_pozadavku integer
  );
revoke all on "mzdy".prac_mist from "public";

create unique  index "mzdy".i_prmist_cislo on "mzdy".prac_mist (cis_pracmist, naz_pracmist, systemovy_typ);
create  index "mzdy".i_prmist_predek on "mzdy".prac_mist (id_predka);
create  index "mzdy".i_prmist_typ on "mzdy".prac_mist (systemovy_typ, id_podniku);
{ TABLE "mzdy".prac_mist_atrblob row size = 0 number of columns = 2 index size = 0 }
{ unload file name = prac_mist_atrblob.unl number of rows = 0 }
create table "mzdy".prac_mist_atrblob 
  (
    id integer not null,
    popis byte
  );
revoke all on "mzdy".prac_mist_atrblob from "public";

{ TABLE "mzdy".prac_mist_atrib row size = 0 number of columns = 8 index size = 0 }
{ unload file name = prac_mist_atrib.unl number of rows = 2090 }
create table "mzdy".prac_mist_atrib 
  (
    id integer not null,
    id_pracmist integer not null,
    cis_atributu integer not null,
    hodnota char(50),
    platnost_od date,
    platnost_do date,
    pripojit integer not null,
    id_provazani integer
  );
revoke all on "mzdy".prac_mist_atrib from "public";

create  index "mzdy".i_prac_mist_atr1 on "mzdy".prac_mist_atrib (id_pracmist, cis_atributu, platnost_od, platnost_do);
create  index "mzdy".i_prac_mist_atr2 on "mzdy".prac_mist_atrib (id_provazani);
{ TABLE "mzdy".prac_pom row size = 0 number of columns = 136 index size = 0 }
{ unload file name = prac_pom.unl number of rows = 1757 }
create table "mzdy".prac_pom 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    druh_pom char(1) not null,
    doba_uvazku char(1) not null,
    prac_str char(10) not null,
    skup_prac char(7),
    prac_kateg integer,
    jkz integer,
    pov_funkce char(12),
    mzd_stup integer,
    trida integer,
    typ_tt integer not null,
    zak_uvazek decimal(4,2) not null,
    hod_uvazek decimal(4,2) not null,
    smena integer,
    duvod_kratsi char(1),
    typ_kal integer not null,
    rozp_kateg char(3),
    vykaz char(3),
    rez_zakazka char(10),
    typ_mzdy integer not null,
    tarif decimal(16,2) not null,
    os_hodn decimal(16,2),
    tarif_cizi decimal(16,4),
    kurz_cizi decimal(16,4),
    pripl_vedeni decimal(16,2),
    pripl_zvlastni decimal(16,2),
    typ_premii integer,
    prem_cast decimal(16,2),
    odpr_pro_dov integer not null,
    neodpr_dny integer not null,
    ex_dov char(1),
    navaz_dov char(1),
    dov_narok decimal(3,1) not null,
    dov_cerpana decimal(5,2) not null,
    dov_kracena decimal(5,2) not null,
    dov_predmin decimal(5,2),
    zbyv_rd_min_rok decimal(5,2) not null,
    rd_letos decimal(5,2) not null,
    dov_dodatk_r decimal(5,2),
    dov_dodatk decimal(5,2),
    trv_dov char(1) not null,
    trv_nem char(1) not null,
    dny_ro_dov decimal(5,1) not null,
    hod_ro_dov decimal(7,2) not null,
    kcs_dov decimal(16,2) not null,
    kcs_dov_1 decimal(16,2) not null,
    kcs_dov_2 decimal(16,2) not null,
    kcs_dov_3 decimal(16,2) not null,
    kcs_dov_4 decimal(16,2) not null,
    prum_dov decimal(16,2),
    min_prum_dov decimal(16,2),
    dny_ro_nem decimal(6,1) not null,
    kcs_nem decimal(16,2) not null,
    prum_nem decimal(16,2),
    min_prum_nem decimal(16,2),
    dny_nemoci integer not null,
    praxe integer,
    praxe_dny integer,
    min_zakl decimal(16,2),
    min_pripl decimal(16,2),
    min_uvazek decimal(4,2),
    min_min_mzda decimal(16,2),
    potl_min_mzdy char(1),
    datum_nastupu date not null,
    duvod_nast char(3),
    datum_zmeny date,
    datum_ukonc date,
    duvod_ukonc char(3),
    zac_nem_poj date,
    eldp_1znak char(1),
    eldp_3znak char(1),
    eldp_akt char(1),
    eldp_nezahrn char(1),
    druh_pom_j char(2),
    zk_doba date,
    kl_po_zam char(4),
    zap_praxe char(8),
    zap_praxe_od date,
    zvys_ps_mes integer,
    zvys_ps_rok integer,
    zvys_ps_dat date,
    id_pracmist integer,
    id_pracmist_2 integer,
    datum_pr_sml date,
    datum_plan_odch date,
    datum_skut_nast date,
    premie_proc_ind decimal(5,2),
    dov_generovat char(1),
    dov_kratit char(1),
    doplnkova_1 char(50),
    doplnkova_2 date,
    cislo_platvym integer,
    cislo_dodatsml integer,
    nahr_hod_uvazek decimal(4,2),
    nahr_typ_kal integer,
    nahr_smena integer,
    jen_duchpoj char(1),
    maly_rozsah char(1),
    dat_doruc_vypov date,
    ucast_duchp_od date,
    misto_vykonu char(50),
    kpd_od date,
    kpd_do date,
    kpd_prum decimal(16,4),
    prum_rok decimal(16,4),
    vychozi_pomer integer,
    c_kmen_pom integer,
    isco08 char(7),
    ind_dn_sk char(1),
    zpusob_ukonc char(7),
    model_pd char(10),
    doch_karta char(15),
    mespr_vypl_nepr char(1),
    id_rez_projekt integer,
    tyd_prac_doba char(1),
    smluv_pom_uv decimal(6,4),
    mes_pom_uv decimal(6,4),
    prum_pom_uv decimal(6,4),
    cislo_sluz_oznac char(3),
    mesice_pracurad integer,
    eldp_vyd_cin_od date,
    legislat_uvazek decimal(4,2),
    id_agentury integer,
    vynimka char(1),
    zpracov_mzdy char(7),
    zpracov_pers char(7),
    mena_cizi char(3),
    ic_prav_vztahu char(15),
    doplnkova_3 char(10),
    odvod_odp_pol_od date,
    odvod_odp_pol_do date,
    naroc_prof_produch char(1),
    garance_castka decimal(16,2),
    homeof_typ_kal integer,
    homeof_smena integer
  );
revoke all on "mzdy".prac_pom from "public";

create  index "mzdy".ix_pom on "mzdy".prac_pom (os_cislo);
create unique  index "mzdy".ix_pom2 on "mzdy".prac_pom (os_cislo, cislo_pom);
create  index "mzdy".ix_pom3 on "mzdy".prac_pom (os_cislo, datum_nastupu, datum_ukonc);
create  index "mzdy".ix_pom4 on "mzdy".prac_pom (datum_nastupu);
create  index "mzdy".ix_pom5 on "mzdy".prac_pom (datum_ukonc);
{ TABLE "mzdy".pp_prac_pom row size = 0 number of columns = 4 index size = 0 }
{ unload file name = pp_prac_pom.unl number of rows = 0 }
create table "mzdy".pp_prac_pom 
  (
    polozka char(60) not null,
    hodnota char(50) not null,
    castka decimal(16,2),
    id integer not null
  );
revoke all on "mzdy".pp_prac_pom from "public";

create unique  index "mzdy".ix_pp_prac_p on "mzdy".pp_prac_pom (polozka, hodnota);
{ TABLE "mzdy".poznam_prava_hlav row size = 0 number of columns = 5 index size = 0 }
{ unload file name = poznam_prava_hlav.unl number of rows = 0 }
create table "mzdy".poznam_prava_hlav 
  (
    id_hlavickapozn integer not null,
    role_id integer not null,
    prava char(5),
    platnost_od char(20) not null,
    platnost_do char(20)
  );
revoke all on "mzdy".poznam_prava_hlav from "public";

{ TABLE "mzdy".pozadav_funk row size = 0 number of columns = 13 index size = 0 }
{ unload file name = pozadav_funk.unl number of rows = 0 }
create table "mzdy".pozadav_funk 
  (
    c_skol char(10),
    os_cislo decimal(10,0),
    datum_od date,
    datum_do date,
    druh integer,
    termin date,
    datum_vlozeni date,
    navedeno_z_ppm integer,
    id_ext_vazby integer,
    new_ref integer,
    upresneni char(255),
    id_zadosti integer,
    popis char(200)
  );
revoke all on "mzdy".pozadav_funk from "public";

create unique  index "mzdy".ix_pozadav_funk1 on "mzdy".pozadav_funk (c_skol, os_cislo, datum_od, druh);
create  index "mzdy".ix_pozadav_funk2 on "mzdy".pozadav_funk (os_cislo, c_skol, datum_od, datum_do);
create  index "mzdy".ix_pozadav_funk3 on "mzdy".pozadav_funk (id_ext_vazby);
{ TABLE "mzdy".pozadav_trid row size = 0 number of columns = 4 index size = 0 }
{ unload file name = pozadav_trid.unl number of rows = 0 }
create table "mzdy".pozadav_trid 
  (
    trida integer,
    typ_mzdy integer not null,
    stupen_vzd char(2),
    praxe integer not null
  );
revoke all on "mzdy".pozadav_trid from "public";

create  index "mzdy".idx_pozadav_trid on "mzdy".pozadav_trid (trida, typ_mzdy);
{ TABLE "mzdy".poznam_hlavicky row size = 0 number of columns = 10 index size = 0 }
{ unload file name = poznam_hlavicky.unl number of rows = 0 }
create table "mzdy".poznam_hlavicky 
  (
    id_hlavickapozn integer not null,
    prog_jmeno char(14) not null,
    hlavicka char(20) not null,
    poradi integer not null,
    obecny_pristup integer not null,
    datovy_typ integer not null,
    vazba_table char(18),
    vazba_column char(18),
    vazba_display char(80),
    vazba_podminka char(100)
  );
revoke all on "mzdy".poznam_hlavicky from "public";

create unique  index "mzdy".ix_poznhl_1 on "mzdy".poznam_hlavicky (prog_jmeno, hlavicka);
{ TABLE "mzdy".prac_pom_po row size = 0 number of columns = 7 index size = 0 }
{ unload file name = prac_pom_po.unl number of rows = 3013 }
create table "mzdy".prac_pom_po 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    polozka char(20),
    hodnota char(80),
    datum_od date,
    datum_do date,
    skupina char(20)
  );
revoke all on "mzdy".prac_pom_po from "public";

create  index "mzdy".ix_pom_po1 on "mzdy".prac_pom_po (os_cislo, cislo_pom, polozka);
{ TABLE "mzdy".prac_postup row size = 0 number of columns = 22 index size = 0 }
{ unload file name = prac_postup.unl number of rows = 7167 }
create table "mzdy".prac_postup 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    platnost_od date not null,
    platnost_do date,
    id_pracmist integer,
    trida integer,
    mzd_stup integer,
    tarif decimal(16,2) not null,
    os_hodn decimal(16,2),
    prem_cast decimal(16,2),
    pripl_vedeni decimal(16,2),
    pripl_zvlastni decimal(16,2),
    typ_mzdy integer not null,
    prac_str char(10) not null,
    jkz integer,
    prac_kateg integer,
    smena integer,
    typ_kal integer not null,
    hod_uvazek decimal(4,2) not null,
    smluv_pom_uv decimal(6,4) not null,
    poznamka char(160),
    garance_castka decimal(16,2)
  );
revoke all on "mzdy".prac_postup from "public";

create unique  index "mzdy".ix_postup on "mzdy".prac_postup (os_cislo, cislo_pom, platnost_od, platnost_do);
create  index "mzdy".ix_postup_misto on "mzdy".prac_postup (id_pracmist, platnost_od, platnost_do);
{ TABLE "mzdy".prac_povol row size = 0 number of columns = 11 index size = 0 }
{ unload file name = prac_povol.unl number of rows = 0 }
create table "mzdy".prac_povol 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    pr_pov char(1) not null,
    pr_pov_od date,
    pr_pov_do date,
    dat_pobytu_do date,
    cdokl_povol_pobyt char(15),
    vydal_povol_pobyt char(100),
    doc_ochrana integer,
    doc_ochrana_od date,
    doc_ochrana_do date
  );
revoke all on "mzdy".prac_povol from "public";

create unique  index "mzdy".idx_pr_pov on "mzdy".prac_povol (id);
{ TABLE "mzdy".prac_zal row size = 0 number of columns = 160 index size = 0 }
{ unload file name = prac_zal.unl number of rows = 45168 }
create table "mzdy".prac_zal 
  (
    os_cislo decimal(10,0),
    prijmeni char(40),
    jmeno char(40),
    titul char(25),
    rodne_jmeno char(40),
    rodne_cislo char(10),
    misto_narozeni char(48),
    rodin_stav char(1),
    narodnost char(2),
    st_prisl char(3),
    cislo_op char(12),
    cislo_pasu char(12),
    bran_pov char(2),
    ulice_trv char(45),
    tr_ulice char(30),
    tr_cislo char(14),
    misto_trv char(48),
    psc_trv char(5),
    posta_trv char(48),
    ulice_prech char(45),
    pr_ulice char(30),
    pr_cislo char(14),
    misto_prech char(48),
    psc_prech char(5),
    posta_prech char(48),
    kmen_str char(10),
    vypl_str integer,
    zaloha decimal(16,2),
    prech_zal integer,
    druh_slevy integer,
    zmen_prac_sch char(2),
    vyziv_os_nvc integer,
    vyziv_os_exm integer,
    druh_duchodu char(3),
    duchod_od date,
    clen_roh char(1),
    vybor_oh integer,
    datum_nastupu date,
    datum_vystupu date,
    datum_zmeny date,
    uhrn_mezd_letos decimal(16,2),
    uhrn_dohod decimal(16,2),
    kal_dny_dohod integer not null,
    uhrn_pojist decimal(16,2),
    dan_sleva char(1),
    sleva_od date,
    student char(1) not null,
    uhrn_dan_zakl decimal(16,2),
    uhrn_dani decimal(16,2),
    dan_zakl_cizi decimal(16,2) not null,
    dan_cizi decimal(16,2) not null,
    uhrn_nem decimal(16,2) not null,
    zakl_sraz_dan decimal(16,2) not null,
    srazk_dan decimal(16,2) not null,
    m_dan_zakl_cizi decimal(16,2) not null,
    m_dan_cizi decimal(16,2) not null,
    m_uhrn_nem decimal(16,2) not null,
    m_zakl_sraz_dan decimal(16,2) not null,
    m_srazk_dan decimal(16,2) not null,
    rocni_zuct char(1),
    m_dan_zakl decimal(16,2),
    m_dan decimal(16,2),
    rocni_odpoc decimal(16,2),
    odpoc_duch integer,
    odpoc_manz decimal(16,2),
    odpoc_dary decimal(16,2),
    dan_roc_zakl decimal(16,2),
    zust_minci decimal(16,2),
    dluh decimal(16,2),
    kal_dny integer,
    nahr_dny integer,
    kcs_duchod decimal(16,2),
    vek_duchod integer,
    mes_duchod decimal(3,1),
    odpr_roky_dov integer,
    odpr_dny_dov integer,
    zam_roky integer,
    zam_dny integer,
    zdrav_poj integer,
    zdrav_poj_od date,
    min_zdrav_poj integer,
    cis_poj_cizi char(10),
    deti_pro_duch integer,
    uhrn_dan_z_c decimal(16,2),
    uhrn_pojist_c decimal(16,2),
    eldp_adr char(1),
    eldp_zahr char(1),
    eldp_kod_st integer,
    nepoc_soc integer,
    kontr_podp_doby integer,
    prihl_jm char(128),
    model_pd char(10),
    titul_za char(25),
    sleva_do date,
    zps_od date,
    zps_do date,
    dan_nerez char(1),
    stravenky char(1),
    bez_dane char(1),
    datum_1_nast date,
    duchod_do date,
    op_plat date,
    pas_plat date,
    dat_duch_predp date,
    souhlas_cud char(1),
    souhlas_cud_mzd char(1),
    uhrn_dsleva decimal(16,2),
    uhrn_dbonus decimal(16,2),
    m_dsleva decimal(16,2),
    m_dbonus decimal(16,2),
    dsleva_cizi decimal(16,2),
    dbonus_cizi decimal(16,2),
    id_agentury integer,
    id_firmy integer,
    uhrn_superhr decimal(16,2),
    uhrn_sp_firma decimal(16,2),
    uhrn_zp_firma decimal(16,2),
    soc_uhrn_vz decimal(16,2),
    zdrav_uhrn_vz decimal(16,2),
    soc_uhrn_vz_x decimal(16,2),
    zdrav_uhrn_vz_x decimal(16,2),
    druhy_pilier_sk char(1),
    zac_nem_poj date,
    duch_poj_ciz char(1),
    prech_stat_adr char(2),
    trv_postcode char(11),
    prech_postcode char(11),
    cssz_ecp char(10),
    doch_karta char(15),
    okres_nar char(20),
    stat_nar char(2),
    stat_adr char(2),
    id_podniku integer not null,
    e101 char(1),
    znc_max decimal(16,2),
    uhrn_soc_poj decimal(16,2),
    uhrn_zdrav_poj decimal(16,2),
    cislo_duch_spor char(10),
    smluv_netto decimal(16,2),
    smluv_netto_cizi decimal(16,2),
    uhrn_dohod_cizi decimal(16,2),
    uhrn_sp_cizi decimal(16,2),
    uhrn_zp_cizi decimal(16,2),
    evid_cislo char(32),
    odpoc_zp char(1),
    dcis_nerezidenta char(20),
    typdcis_nerezid char(1),
    statdcis_nerezid char(2),
    cdokl_nerezid char(15),
    typdokl_nerezid char(1),
    statdokl_nerezid char(2),
    dat_ukonczam_cr date,
    doktorand char(1),
    prijmy_doh decimal(16,2),
    vydavatel_pasu char(40),
    dat_zacatkuzam_cr date,
    sleva_sp_fir_stav char(1),
    sleva_sp_fir_druh char(1),
    sleva_sp_duch char(1),
    datum date not null
  );
revoke all on "mzdy".prac_zal from "public";

create unique  index "mzdy".ix_pracz10 on "mzdy".prac_zal (os_cislo, datum);
create  index "mzdy".ix_priz10 on "mzdy".prac_zal (prijmeni, datum);
create  index "mzdy".ix_prac_strz10 on "mzdy".prac_zal (kmen_str, os_cislo, datum);
create unique  index "mzdy".ix_pracz210 on "mzdy".prac_zal (os_cislo, datum, id_podniku);
create  index "mzdy".ix_pracz310 on "mzdy".prac_zal (datum);
create  index "mzdy".ix_pracz410 on "mzdy".prac_zal (rodne_cislo);
{ TABLE "mzdy".pracovnici row size = 0 number of columns = 159 index size = 0 }
{ unload file name = pracovnici.unl number of rows = 924 }
create table "mzdy".pracovnici 
  (
    os_cislo decimal(10,0),
    prijmeni char(40),
    jmeno char(40),
    titul char(25),
    rodne_jmeno char(40),
    rodne_cislo char(10),
    misto_narozeni char(48),
    rodin_stav char(1),
    narodnost char(2),
    st_prisl char(3),
    cislo_op char(12),
    cislo_pasu char(12),
    bran_pov char(2),
    ulice_trv char(45),
    tr_ulice char(30),
    tr_cislo char(14),
    misto_trv char(48),
    psc_trv char(5),
    posta_trv char(48),
    ulice_prech char(45),
    pr_ulice char(30),
    pr_cislo char(14),
    misto_prech char(48),
    psc_prech char(5),
    posta_prech char(48),
    kmen_str char(10),
    vypl_str integer,
    zaloha decimal(16,2),
    prech_zal integer,
    druh_slevy integer,
    zmen_prac_sch char(2),
    vyziv_os_nvc integer,
    vyziv_os_exm integer,
    druh_duchodu char(3),
    duchod_od date,
    clen_roh char(1),
    vybor_oh integer,
    datum_nastupu date,
    datum_vystupu date,
    datum_zmeny date,
    uhrn_mezd_letos decimal(16,2),
    uhrn_dohod decimal(16,2),
    kal_dny_dohod integer not null,
    uhrn_pojist decimal(16,2),
    dan_sleva char(1),
    sleva_od date,
    student char(1) not null,
    uhrn_dan_zakl decimal(16,2),
    uhrn_dani decimal(16,2),
    dan_zakl_cizi decimal(16,2) not null,
    dan_cizi decimal(16,2) not null,
    uhrn_nem decimal(16,2) not null,
    zakl_sraz_dan decimal(16,2) not null,
    srazk_dan decimal(16,2) not null,
    m_dan_zakl_cizi decimal(16,2) not null,
    m_dan_cizi decimal(16,2) not null,
    m_uhrn_nem decimal(16,2) not null,
    m_zakl_sraz_dan decimal(16,2) not null,
    m_srazk_dan decimal(16,2) not null,
    rocni_zuct char(1),
    m_dan_zakl decimal(16,2),
    m_dan decimal(16,2),
    rocni_odpoc decimal(16,2),
    odpoc_duch integer,
    odpoc_manz decimal(16,2),
    odpoc_dary decimal(16,2),
    dan_roc_zakl decimal(16,2),
    zust_minci decimal(16,2),
    dluh decimal(16,2),
    kal_dny integer,
    nahr_dny integer,
    kcs_duchod decimal(16,2),
    vek_duchod integer,
    mes_duchod decimal(3,1),
    odpr_roky_dov integer,
    odpr_dny_dov integer,
    zam_roky integer,
    zam_dny integer,
    zdrav_poj integer,
    zdrav_poj_od date,
    min_zdrav_poj integer,
    cis_poj_cizi char(10),
    deti_pro_duch integer,
    uhrn_dan_z_c decimal(16,2),
    uhrn_pojist_c decimal(16,2),
    eldp_adr char(1),
    eldp_zahr char(1),
    eldp_kod_st integer,
    nepoc_soc integer,
    kontr_podp_doby integer,
    prihl_jm char(128),
    model_pd char(10),
    titul_za char(25),
    sleva_do date,
    zps_od date,
    zps_do date,
    dan_nerez char(1),
    stravenky char(1),
    bez_dane char(1),
    datum_1_nast date,
    duchod_do date,
    op_plat date,
    pas_plat date,
    dat_duch_predp date,
    souhlas_cud char(1),
    souhlas_cud_mzd char(1),
    uhrn_dsleva decimal(16,2),
    uhrn_dbonus decimal(16,2),
    m_dsleva decimal(16,2),
    m_dbonus decimal(16,2),
    dsleva_cizi decimal(16,2),
    dbonus_cizi decimal(16,2),
    id_agentury integer,
    id_firmy integer,
    uhrn_superhr decimal(16,2),
    uhrn_sp_firma decimal(16,2),
    uhrn_zp_firma decimal(16,2),
    soc_uhrn_vz decimal(16,2),
    zdrav_uhrn_vz decimal(16,2),
    soc_uhrn_vz_x decimal(16,2),
    zdrav_uhrn_vz_x decimal(16,2),
    druhy_pilier_sk char(1),
    zac_nem_poj date,
    duch_poj_ciz char(1),
    prech_stat_adr char(2),
    trv_postcode char(11),
    prech_postcode char(11),
    cssz_ecp char(10),
    doch_karta char(15),
    okres_nar char(20),
    stat_nar char(2),
    stat_adr char(2),
    id_podniku integer not null,
    e101 char(1),
    znc_max decimal(16,2),
    uhrn_soc_poj decimal(16,2),
    uhrn_zdrav_poj decimal(16,2),
    cislo_duch_spor char(10),
    smluv_netto decimal(16,2),
    smluv_netto_cizi decimal(16,2),
    uhrn_dohod_cizi decimal(16,2),
    uhrn_sp_cizi decimal(16,2),
    uhrn_zp_cizi decimal(16,2),
    evid_cislo char(32),
    odpoc_zp char(1),
    dcis_nerezidenta char(20),
    typdcis_nerezid char(1),
    statdcis_nerezid char(2),
    cdokl_nerezid char(15),
    typdokl_nerezid char(1),
    statdokl_nerezid char(2),
    dat_ukonczam_cr date,
    doktorand char(1),
    prijmy_doh decimal(16,2),
    vydavatel_pasu char(40),
    dat_zacatkuzam_cr date,
    sleva_sp_fir_stav char(1),
    sleva_sp_fir_druh char(1),
    sleva_sp_duch char(1)
  );
revoke all on "mzdy".pracovnici from "public";

create unique  index "mzdy".ix_prac on "mzdy".pracovnici (os_cislo);
create  index "mzdy".ix_pri on "mzdy".pracovnici (prijmeni, jmeno);
create unique  index "mzdy".ix_prac_str on "mzdy".pracovnici (kmen_str, os_cislo);
create unique  index "mzdy".ix_prac_idposc on "mzdy".pracovnici (id_podniku, os_cislo, datum_vystupu);
create  index "mzdy".ix_pracovn_rc on "mzdy".pracovnici (rodne_cislo);
create  index "mzdy".ix_pra_stra on "mzdy".pracovnici (stravenky);
create  index "mzdy".ix_prac_1 on "mzdy".pracovnici (id_podniku, os_cislo, prijmeni, jmeno, titul, rodne_jmeno);
create  index "mzdy".ix_prac_2 on "mzdy".pracovnici (min_zdrav_poj, id_podniku, os_cislo);
{ TABLE "mzdy".pracovnici_po row size = 0 number of columns = 5 index size = 0 }
{ unload file name = pracovnici_po.unl number of rows = 166 }
create table "mzdy".pracovnici_po 
  (
    os_cislo decimal(10,0) not null,
    polozka char(20),
    hodnota char(80),
    dat_od date,
    dat_do date
  );
revoke all on "mzdy".pracovnici_po from "public";

{ TABLE "mzdy".praktic_zkus row size = 0 number of columns = 10 index size = 0 }
{ unload file name = praktic_zkus.unl number of rows = 0 }
create table "mzdy".praktic_zkus 
  (
    os_cislo decimal(10,0) not null,
    zkusenost char(15) not null,
    pocet_let decimal(3,1),
    ziskano_kde char(40),
    ziskano_od date,
    ziskano_do date,
    id_pracmist integer,
    prepinac integer,
    id_projekt integer,
    hodnota_projektu decimal(16,2)
  );
revoke all on "mzdy".praktic_zkus from "public";

create  index "mzdy".ix_pr_zkus on "mzdy".praktic_zkus (os_cislo, zkusenost);
{ TABLE "mzdy".prava row size = 0 number of columns = 3 index size = 0 }
{ unload file name = prava.unl number of rows = 0 }
create table "mzdy".prava 
  (
    uziv char(64) not null,
    k_tarifu char(1),
    k_zdrpoj char(1)
  );
revoke all on "mzdy".prava from "public";

{ TABLE "mzdy".prenos_psp row size = 0 number of columns = 3 index size = 0 }
{ unload file name = prenos_psp.unl number of rows = 0 }
create table "mzdy".prenos_psp 
  (
    datum date not null,
    stred char(10) not null,
    castka decimal(16,2)
  );
revoke all on "mzdy".prenos_psp from "public";

{ TABLE "mzdy".prenuk row size = 0 number of columns = 5 index size = 0 }
{ unload file name = prenuk.unl number of rows = 0 }
create table "mzdy".prenuk 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    hodiny decimal(5,2),
    castka decimal(16,2),
    datum date
  );
revoke all on "mzdy".prenuk from "public";

create unique  index "mzdy".ix_prenuk1 on "mzdy".prenuk (os_cislo, cislo_pom, datum);
create  index "mzdy".ix_prenuk2 on "mzdy".prenuk (os_cislo, hodiny, castka);
{ TABLE "mzdy".premie row size = 0 number of columns = 18 index size = 0 }
{ unload file name = premie.unl number of rows = 0 }
create table "mzdy".premie 
  (
    id integer not null,
    id_zdroj integer,
    id_pozadavku integer,
    typ integer not null,
    kod integer,
    obdobi date,
    os_cislo decimal(10,0),
    cislo_pom integer,
    typ_org_j integer not null,
    org_j char(12) not null,
    procento integer,
    procento2 integer,
    castka decimal(16,2),
    popis char(100),
    datum date,
    schvaleno date,
    schvalil decimal(10,0),
    uzavreno integer
  );
revoke all on "mzdy".premie from "public";

create  index "mzdy".ix_prem_os on "mzdy".premie (os_cislo, cislo_pom);
create  index "mzdy".ix_prem_obd on "mzdy".premie (typ, obdobi, typ_org_j, org_j);
create  index "mzdy".ix_prem_zdr on "mzdy".premie (id_zdroj);
create  index "mzdy".ix_prem_ito on "mzdy".premie (id_pozadavku, typ, obdobi);
create  index "mzdy".ix_prem_oct on "mzdy".premie (typ, kod, obdobi, os_cislo, cislo_pom, org_j);
{ TABLE "mzdy".premie_kraceni row size = 0 number of columns = 19 index size = 0 }
{ unload file name = premie_kraceni.unl number of rows = 0 }
create table "mzdy".premie_kraceni 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    typ_krac integer,
    kod_krac integer,
    sazba_krac decimal(16,2),
    kraceno_akt decimal(16,2),
    placeno_akt decimal(16,2),
    kraceno decimal(16,2),
    proplatit integer,
    typ_propl integer,
    kod_propl integer,
    sazba_propl decimal(16,2),
    kraceno_akt_2 decimal(16,2),
    placeno_akt_2 decimal(16,2),
    kraceno_2 decimal(16,2),
    proplatit_2 integer,
    typ_propl_2 integer,
    kod_propl_2 integer,
    sazba_propl_2 decimal(16,2)
  );
revoke all on "mzdy".premie_kraceni from "public";

create unique  index "mzdy".ix_prem_kr1 on "mzdy".premie_kraceni (os_cislo, cislo_pom);
{ TABLE "mzdy".prem_proc row size = 0 number of columns = 6 index size = 0 }
{ unload file name = prem_proc.unl number of rows = 0 }
create table "mzdy".prem_proc 
  (
    os_cislo decimal(10,0),
    cislo_pom integer,
    kod integer,
    prac_str char(10),
    procento decimal(5,2),
    datum date
  );
revoke all on "mzdy".prem_proc from "public";

create unique  index "mzdy".ix_ppr_0 on "mzdy".prem_proc (os_cislo, cislo_pom, datum);
create  index "mzdy".ix_ppr_1 on "mzdy".prem_proc (os_cislo);
create  index "mzdy".ix_ppr_2 on "mzdy".prem_proc (prac_str);
{ TABLE "mzdy".prilohy row size = 0 number of columns = 13 index size = 0 }
{ unload file name = prilohy.unl number of rows = 0 }
create table "mzdy".prilohy 
  (
    id integer not null,
    pouziti integer not null,
    vlastnik char(18) not null,
    vazba_vlastnik char(250) not null,
    vazba_vlastnik_dw char(250) not null,
    id_vlastnik integer not null,
    id_info_blob integer not null,
    nazev char(64),
    datum_porizeni date,
    poridil char(64),
    cesta_soubor char(200),
    nazev_soubor char(50),
    poznamka char(250)
  );
revoke all on "mzdy".prilohy from "public";

create  index "mzdy".ix_prilohy1 on "mzdy".prilohy (pouziti, vlastnik, vazba_vlastnik);
create  index "mzdy".ix_prilohy2 on "mzdy".prilohy (vlastnik, id_vlastnik);
{ TABLE "mzdy".priplatky row size = 0 number of columns = 15 index size = 0 }
{ unload file name = priplatky.unl number of rows = 486 }
create table "mzdy".priplatky 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    kod integer,
    castka decimal(16,2),
    disp_str char(10),
    plati_od date,
    plati_do date,
    agenda char(20),
    perioda integer,
    castka_cizi decimal(16,2),
    mena_cizi char(3),
    kurz_cizi decimal(16,4),
    id_vazby integer,
    typ_vazby char(2),
    pozn char(60)
  );
revoke all on "mzdy".priplatky from "public";

create  index "mzdy".ix_pripl on "mzdy".priplatky (os_cislo);
create  index "mzdy".ix_pripl_dat on "mzdy".priplatky (os_cislo, plati_od, plati_do);
create  index "mzdy".ix_pripl_ag on "mzdy".priplatky (os_cislo, cislo_pom, kod, agenda);
{ TABLE "mzdy".pristup_prac row size = 0 number of columns = 5 index size = 0 }
{ unload file name = pristup_prac.unl number of rows = 1 }
create table "mzdy".pristup_prac 
  (
    uzivatel char(64) not null,
    pristup_osc decimal(10,0) not null,
    pristup integer not null,
    dat_od char(17) not null,
    dat_do char(17)
  );
revoke all on "mzdy".pristup_prac from "public";

create  index "mzdy".ix_pst_uzio on "mzdy".pristup_prac (uzivatel, dat_od, dat_do);
create  index "mzdy".ix_pst_osc on "mzdy".pristup_prac (pristup_osc, dat_od, dat_do);
{ TABLE "mzdy".pristup_stred row size = 0 number of columns = 4 index size = 0 }
{ unload file name = pristup_stred.unl number of rows = 8 }
create table "mzdy".pristup_stred 
  (
    uzivatel char(64) not null,
    pristup_str char(10) not null,
    dat_od char(17) not null,
    dat_do char(17)
  );
revoke all on "mzdy".pristup_stred from "public";

create  index "mzdy".ix_pst_str1 on "mzdy".pristup_stred (pristup_str, dat_od, dat_do);
{ TABLE "mzdy".prof_vazba row size = 0 number of columns = 18 index size = 0 }
{ unload file name = prof_vazba.unl number of rows = 0 }
create table "mzdy".prof_vazba 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    typ char(1) not null,
    id_pracmist integer not null,
    str char(10) not null,
    id_zak integer,
    id_profese integer not null,
    typ_mzdy integer not null,
    mzd_stup integer not null,
    tarif decimal(16,2) not null,
    id_prem integer,
    pozn char(40),
    dat_od date,
    dat_do date,
    aut_gen integer,
    pripl_sone integer,
    pripl_svat integer
  );
revoke all on "mzdy".prof_vazba from "public";

create  index "mzdy".ix_cv_osc on "mzdy".prof_vazba (os_cislo, cislo_pom);
create  index "mzdy".ix_cv_str on "mzdy".prof_vazba (str);
create  index "mzdy".ix_cv_dat on "mzdy".prof_vazba (dat_od, dat_do);
{ TABLE "mzdy".priznaky row size = 0 number of columns = 10 index size = 0 }
{ unload file name = priznaky.unl number of rows = 0 }
create table "mzdy".priznaky 
  (
    id integer not null,
    idp integer not null,
    os_cislo decimal(10,0),
    cislo_pom integer,
    hodnota char(50),
    dat_od date,
    dat_do date,
    datum date,
    vznik char(22),
    vytvoril char(32)
  );
revoke all on "mzdy".priznaky from "public";

create  index "mzdy".ix_prizn1 on "mzdy".priznaky (vznik, vytvoril);
create  index "mzdy".ix_prizn2 on "mzdy".priznaky (id, os_cislo, cislo_pom, hodnota);
{ TABLE "mzdy".prerus_pob_duch row size = 0 number of columns = 4 index size = 0 }
{ unload file name = prerus_pob_duch.unl number of rows = 0 }
create table "mzdy".prerus_pob_duch 
  (
    os_cislo decimal(10,0) not null,
    datum_od date not null,
    datum_do date,
    poznamka char(30)
  );
revoke all on "mzdy".prerus_pob_duch from "public";

{ TABLE "mzdy".prescasy row size = 0 number of columns = 10 index size = 0 }
{ unload file name = prescasy.unl number of rows = 0 }
create table "mzdy".prescasy 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom decimal(10,0) not null,
    prac_str char(10) not null,
    hodiny decimal(6,2) not null,
    datum_vzniku date,
    obd_vzniku date,
    dat_uplatneni date,
    prev_do_obd date,
    co integer not null,
    odkud integer not null
  );
revoke all on "mzdy".prescasy from "public";

create  index "mzdy".ix_prescasy on "mzdy".prescasy (os_cislo, obd_vzniku, co);
create  index "mzdy".ix_prescasy2 on "mzdy".prescasy (os_cislo, obd_vzniku, prev_do_obd);
create  index "mzdy".ix_prescasy3 on "mzdy".prescasy (os_cislo, prev_do_obd, co);
create  index "mzdy".ix_prescasy4 on "mzdy".prescasy (os_cislo, datum_vzniku, co);
{ TABLE "mzdy".prohl row size = 0 number of columns = 15 index size = 0 }
{ unload file name = prohl.unl number of rows = 3 }
create table "mzdy".prohl 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cis_pom integer,
    dr_proh integer not null,
    vysl char(1),
    potl_period char(1),
    pred_nastup char(1),
    datum date,
    uskutecnena date,
    cetnost integer,
    platce integer,
    lekar integer,
    castka decimal(16,2),
    poznamka char(100),
    vstup char(1) not null
  );
revoke all on "mzdy".prohl from "public";

create  index "mzdy".ix_proh1 on "mzdy".prohl (os_cislo, cis_pom, datum);
create  index "mzdy".ix_proh2 on "mzdy".prohl (os_cislo, cis_pom);
create  index "mzdy".ix_proh3 on "mzdy".prohl (os_cislo);
create  index "mzdy".ix_proh4 on "mzdy".prohl (datum);
{ TABLE "mzdy".prohl_cena row size = 0 number of columns = 4 index size = 0 }
{ unload file name = prohl_cena.unl number of rows = 0 }
create table "mzdy".prohl_cena 
  (
    cislo integer not null,
    castka decimal(16,2) not null,
    org_jed char(10) not null,
    typ_jed integer not null
  );
revoke all on "mzdy".prohl_cena from "public";

create  index "mzdy".ix_pr_ce on "mzdy".prohl_cena (cislo, org_jed, typ_jed);
{ TABLE "mzdy".prv_profily row size = 0 number of columns = 8 index size = 0 }
{ unload file name = prv_profily.unl number of rows = 0 }
create table "mzdy".prv_profily 
  (
    id_profilu integer not null,
    nazev_profilu char(60) not null,
    popis_profilu char(250),
    druh_rad_prav integer not null,
    id_pracmist integer,
    id_oj integer,
    sam_sebe integer not null,
    ev_udaj char(40)
  );
revoke all on "mzdy".prv_profily from "public";

{ TABLE "mzdy".prv_profily_role row size = 0 number of columns = 5 index size = 0 }
{ unload file name = prv_profily_role.unl number of rows = 0 }
create table "mzdy".prv_profily_role 
  (
    id_profilu integer not null,
    role_id integer not null,
    povoleno integer not null,
    platnost_od char(20) not null,
    platnost_do char(20)
  );
revoke all on "mzdy".prv_profily_role from "public";

{ TABLE "mzdy".prv_profily_uziv row size = 0 number of columns = 16 index size = 0 }
{ unload file name = prv_profily_uziv.unl number of rows = 0 }
create table "mzdy".prv_profily_uziv 
  (
    id_uzivprofil integer not null,
    uzivatel char(64) not null,
    id_profilu integer not null,
    pridel_delegov char(1) not null,
    mozno_delegovat integer not null,
    pristup_od date not null,
    pristup_do date,
    id_pracmist integer,
    id_oj integer,
    priradil_kdo char(64),
    priradil_kdy date,
    delegoval_kdo char(64),
    delegoval_kdy date,
    delegoval_os_cislo decimal(10,0),
    vychozi integer not null,
    vychozi_portal integer not null
  );
revoke all on "mzdy".prv_profily_uziv from "public";

create  index "mzdy".ix_profil_uziv1 on "mzdy".prv_profily_uziv (uzivatel, pristup_od, pristup_do);
{ TABLE "mzdy".prv_profily_prava row size = 0 number of columns = 4 index size = 0 }
{ unload file name = prv_profily_prava.unl number of rows = 0 }
create table "mzdy".prv_profily_prava 
  (
    id_profilu integer,
    plati_od char(17) not null,
    plati_do char(17),
    data byte
  );
revoke all on "mzdy".prv_profily_prava from "public";

{ TABLE "mzdy".roc_zuct row size = 0 number of columns = 22 index size = 0 }
{ unload file name = roc_zuct.unl number of rows = 0 }
create table "mzdy".roc_zuct 
  (
    os_cislo decimal(10,0) not null,
    castka decimal(16,2),
    bolestne decimal(16,2),
    kdy integer,
    provedeno date,
    hypoteka decimal(16,2),
    stavebni decimal(16,2),
    skutecnost decimal(16,2),
    uhrn_dan_zakl decimal(16,2),
    uhrn_pojist decimal(16,2),
    uhrn_dan_z_c decimal(16,2),
    uhrn_pojist_c decimal(16,2),
    slev_penz_p decimal(16,2),
    slev_penz_z decimal(16,2),
    penz_prip decimal(16,2),
    ziv_poj decimal(16,2),
    slev_deti decimal(16,2),
    prisp_odb decimal(16,2),
    deti_sleva decimal(16,2),
    deti_bonus decimal(16,2),
    dsleva_c decimal(16,2),
    dbonus_c decimal(16,2)
  );
revoke all on "mzdy".roc_zuct from "public";

create  index "mzdy".ix_roc_zuct on "mzdy".roc_zuct (os_cislo);
{ TABLE "mzdy".rod_prisl row size = 0 number of columns = 24 index size = 0 }
{ unload file name = rod_prisl.unl number of rows = 615 }
create table "mzdy".rod_prisl 
  (
    id_rod_prisl integer not null,
    os_cislo decimal(10,0) not null,
    prijmeni char(40) not null,
    jmeno char(40) not null,
    rodne_cislo char(10),
    datum_narozeni date not null,
    ulice_trv char(30),
    misto_trv char(48),
    psc_trv char(5),
    vztah char(10) not null,
    narok_pd char(1),
    indiv_pd integer,
    sleva char(1),
    sleva_od date,
    sleva_do date,
    dat_snatku date,
    dat_rozvodu date,
    rodne_jmeno char(40),
    misto_narozeni char(48),
    st_prisl char(3),
    sleva_sp char(1),
    poznamka char(40),
    vyzivovana_od date,
    vyzivovana_do date
  );
revoke all on "mzdy".rod_prisl from "public";

create  index "mzdy".ix_rod on "mzdy".rod_prisl (os_cislo);
{ TABLE "mzdy".rod_prisl_slevy row size = 0 number of columns = 7 index size = 0 }
{ unload file name = rod_prisl_slevy.unl number of rows = 550 }
create table "mzdy".rod_prisl_slevy 
  (
    id_rod_prisl integer not null,
    sleva char(1) not null,
    sleva_od date,
    sleva_do date,
    popis char(25),
    poradi integer,
    dotace char(1)
  );
revoke all on "mzdy".rod_prisl_slevy from "public";

create  index "mzdy".ix_rod_prisl_sl on "mzdy".rod_prisl_slevy (id_rod_prisl, sleva_od, sleva_do, sleva);
{ TABLE "mzdy".registr_zam row size = 0 number of columns = 6 index size = 0 }
{ unload file name = registr_zam.unl number of rows = 0 }
create table "mzdy".registr_zam 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    kod integer not null,
    podil decimal(5,2),
    plati_od date,
    plati_do date
  );
revoke all on "mzdy".registr_zam from "public";

create  index "mzdy".ix_reg_zam on "mzdy".registr_zam (os_cislo, cislo_pom, plati_od);
{ TABLE "mzdy".ra row size = 0 number of columns = 1 index size = 0 }
{ unload file name = ra.unl number of rows = 6 }
create table "mzdy".ra 
  (
    ra char(9) not null
  );
revoke all on "mzdy".ra from "public";

{ TABLE "mzdy".pt_s_poznamky row size = 0 number of columns = 18 index size = 0 }
{ unload file name = pt_s_poznamky.unl number of rows = 0 }
create table "mzdy".pt_s_poznamky 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    poznamka char(150),
    datum_cas char(17),
    resitel decimal(10,0),
    uzivatel char(64) not null,
    sablona char(20) not null,
    id_poz integer not null,
    faze integer not null,
    potvrzeno integer not null,
    zneplatneno integer,
    zn_datum_cas char(17),
    zn_resitel decimal(10,0),
    zn_uzivatel char(64),
    mpt char(1),
    trvala integer,
    datum date not null
  );
revoke all on "mzdy".pt_s_poznamky from "public";

create  index "mzdy".ix_pt_s_pozn on "mzdy".pt_s_poznamky (os_cislo, cislo_pom, datum, trvala, zneplatneno);
create  index "mzdy".ix_pt_s_pozn2 on "mzdy".pt_s_poznamky (mpt);
create  index "mzdy".ix_pt_s_pozn3 on "mzdy".pt_s_poznamky (id_poz, potvrzeno);
{ TABLE "mzdy".psc row size = 0 number of columns = 4 index size = 0 }
{ unload file name = psc.unl number of rows = 0 }
create table "mzdy".psc 
  (
    psc char(5) not null,
    obec char(48) not null,
    posta char(48),
    okres char(20)
  );
revoke all on "mzdy".psc from "public";

create unique  index "mzdy".ix_psc on "mzdy".psc (psc, obec);
create  index "mzdy".ix_obec on "mzdy".psc (obec);
{ TABLE "mzdy".prv_rad_prava row size = 0 number of columns = 4 index size = 0 }
{ unload file name = prv_rad_prava.unl number of rows = 0 }
create table "mzdy".prv_rad_prava 
  (
    uzivatel char(64) not null,
    plati_od char(17) not null,
    plati_do char(17),
    data byte
  );
revoke all on "mzdy".prv_rad_prava from "public";

{ TABLE "mzdy".prv_role_akce row size = 0 number of columns = 4 index size = 0 }
{ unload file name = prv_role_akce.unl number of rows = 1990 }
create table "mzdy".prv_role_akce 
  (
    role_id integer not null,
    action_id integer not null,
    dat_od char(17) not null,
    dat_do char(17)
  );
revoke all on "mzdy".prv_role_akce from "public";

{ TABLE "mzdy".prv_role_cisel row size = 0 number of columns = 4 index size = 0 }
{ unload file name = prv_role_cisel.unl number of rows = 3 }
create table "mzdy".prv_role_cisel 
  (
    role_id integer not null,
    role1 char(50) not null,
    db_role char(256),
    zastup char(1)
  );
revoke all on "mzdy".prv_role_cisel from "public";

{ TABLE "mzdy".prv_role_polozky row size = 0 number of columns = 2 index size = 0 }
{ unload file name = prv_role_polozky.unl number of rows = 0 }
create table "mzdy".prv_role_polozky 
  (
    role_id integer not null,
    polozka char(30) not null
  );
revoke all on "mzdy".prv_role_polozky from "public";

{ TABLE "mzdy".prv_role_schema row size = 0 number of columns = 5 index size = 0 }
{ unload file name = prv_role_schema.unl number of rows = 0 }
create table "mzdy".prv_role_schema 
  (
    id integer not null,
    id_schema integer not null,
    role_id integer not null,
    uzivatel char(64) not null,
    datum_cas char(17) not null
  );
revoke all on "mzdy".prv_role_schema from "public";

create  index "mzdy".ix_sch_id_sch on "mzdy".prv_role_schema (id_schema);
{ TABLE "mzdy".prv_role_sestavy row size = 0 number of columns = 3 index size = 0 }
{ unload file name = prv_role_sestavy.unl number of rows = 0 }
create table "mzdy".prv_role_sestavy 
  (
    role_id integer not null,
    cislo_sestavy char(6) not null,
    povol_export char(1) not null
  );
revoke all on "mzdy".prv_role_sestavy from "public";

{ TABLE "mzdy".prv_role_strom row size = 0 number of columns = 2 index size = 0 }
{ unload file name = prv_role_strom.unl number of rows = 0 }
create table "mzdy".prv_role_strom 
  (
    role_id integer not null,
    subrole_id integer not null
  );
revoke all on "mzdy".prv_role_strom from "public";

{ TABLE "mzdy".prv_user_role row size = 0 number of columns = 4 index size = 0 }
{ unload file name = prv_user_role.unl number of rows = 13 }
create table "mzdy".prv_user_role 
  (
    userna char(64) not null,
    role_id integer not null,
    dat_od char(17) not null,
    dat_do char(17)
  );
revoke all on "mzdy".prv_user_role from "public";

{ TABLE "mzdy".proj_ciselniky row size = 0 number of columns = 6 index size = 0 }
{ unload file name = proj_ciselniky.unl number of rows = 0 }
create table "mzdy".proj_ciselniky 
  (
    typ integer not null,
    udaj char(24) not null,
    popis char(60),
    projekt char(24),
    str char(10),
    prizn_proj char(1)
  );
revoke all on "mzdy".proj_ciselniky from "public";

{ TABLE "mzdy".projekty_brutto row size = 0 number of columns = 21 index size = 0 }
{ unload file name = projekty_brutto.unl number of rows = 0 }
create table "mzdy".projekty_brutto 
  (
    c_dokladu integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    projekt char(10),
    prac_str char(10),
    kod integer,
    dat_od date,
    dat_do date,
    p_dny decimal(3,1),
    e_dny decimal(3,1),
    p_hodiny decimal(5,2),
    e_hodiny decimal(5,2),
    procento decimal(5,2),
    p_sazba decimal(16,2),
    e_sazba decimal(16,2),
    p_castka decimal(16,2),
    e_castka decimal(16,2),
    id_zdroj integer,
    soub_davka integer,
    vytvoril char(32),
    datum date not null
  );
revoke all on "mzdy".projekty_brutto from "public";

create  index "mzdy".ix_proj_br1 on "mzdy".projekty_brutto (os_cislo, cislo_pom, datum);
create  index "mzdy".ix_proj_br2 on "mzdy".projekty_brutto (projekt, datum);
create  index "mzdy".ix_proj_br3 on "mzdy".projekty_brutto (projekt, kod, datum);
{ TABLE "mzdy".projekty_cinn row size = 0 number of columns = 5 index size = 0 }
{ unload file name = projekty_cinn.unl number of rows = 0 }
create table "mzdy".projekty_cinn 
  (
    id integer not null,
    id_proj_hod integer not null,
    hod decimal(8,2),
    nazev char(25),
    popis char(250)
  );
revoke all on "mzdy".projekty_cinn from "public";

create  index "mzdy".ix_pr_ci_proj on "mzdy".projekty_cinn (id_proj_hod);
{ TABLE "mzdy".projekty_hod row size = 0 number of columns = 9 index size = 0 }
{ unload file name = projekty_hod.unl number of rows = 0 }
create table "mzdy".projekty_hod 
  (
    id integer not null,
    datum date not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    id_proj integer not null,
    id_poz integer,
    schvaleno date,
    hod decimal(8,2),
    poz char(250)
  );
revoke all on "mzdy".projekty_hod from "public";

create  index "mzdy".ix_pr_ho_doc on "mzdy".projekty_hod (datum, os_cislo, cislo_pom);
create  index "mzdy".ix_pr_ho_docp on "mzdy".projekty_hod (datum, os_cislo, cislo_pom, id_proj);
create unique  index "mzdy".ix_pr_ho_doco on "mzdy".projekty_hod (datum, os_cislo, cislo_pom, id_proj, id_poz);
create  index "mzdy".ix_pr_ho_p on "mzdy".projekty_hod (id_poz);
create  index "mzdy".ix_pr_ho_ps on "mzdy".projekty_hod (id_poz, schvaleno);
{ TABLE "mzdy".projekty_pomery row size = 0 number of columns = 7 index size = 0 }
{ unload file name = projekty_pomery.unl number of rows = 0 }
create table "mzdy".projekty_pomery 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    projekt char(10),
    kod integer,
    procento decimal(7,4),
    obdobi_od date,
    obdobi_do date
  );
revoke all on "mzdy".projekty_pomery from "public";

create  index "mzdy".ix_proj_pom on "mzdy".projekty_pomery (os_cislo, cislo_pom, projekt, kod, obdobi_od, obdobi_do);
{ TABLE "mzdy".propl_prescas row size = 0 number of columns = 12 index size = 0 }
{ unload file name = propl_prescas.unl number of rows = 0 }
create table "mzdy".propl_prescas 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    prevod_z_min decimal(5,2),
    hod_prescasy decimal(5,2),
    hod_kratici decimal(5,2),
    hod_k_proplac decimal(5,2),
    hod_proplaceno decimal(5,2),
    hod_prevod decimal(5,2),
    puv_sazba decimal(16,2),
    sazba decimal(16,2),
    castka decimal(16,2),
    datum date
  );
revoke all on "mzdy".propl_prescas from "public";

create unique  index "mzdy".ix_propl_pres on "mzdy".propl_prescas (os_cislo, cislo_pom, datum);
{ TABLE "mzdy".prtl_obj_setting row size = 0 number of columns = 6 index size = 0 }
{ unload file name = prtl_obj_setting.unl number of rows = 0 }
create table "mzdy".prtl_obj_setting 
  (
    os_cislo decimal(10,0) not null,
    objekt char(80) not null,
    klic char(80) not null,
    verze char(20),
    hodnota char(250),
    id_blobu integer
  );
revoke all on "mzdy".prtl_obj_setting from "public";

{ TABLE "mzdy".prtl_odkazy row size = 0 number of columns = 4 index size = 0 }
{ unload file name = prtl_odkazy.unl number of rows = 0 }
create table "mzdy".prtl_odkazy 
  (
    nazev char(50) not null,
    url char(80) not null,
    cil char(7),
    ikona char(50)
  );
revoke all on "mzdy".prtl_odkazy from "public";

{ TABLE "mzdy".prtl_parametry row size = 0 number of columns = 3 index size = 0 }
{ unload file name = prtl_parametry.unl number of rows = 0 }
create table "mzdy".prtl_parametry 
  (
    nazev char(30) not null,
    hodnota char(1000) not null,
    id_podniku integer
  );
revoke all on "mzdy".prtl_parametry from "public";

{ TABLE "mzdy".prtl_porizovak row size = 0 number of columns = 18 index size = 0 }
{ unload file name = prtl_porizovak.unl number of rows = 0 }
create table "mzdy".prtl_porizovak 
  (
    id_poz integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    prac_str char(10),
    kod integer,
    dny decimal(3,1),
    hodiny decimal(5,2),
    sazba decimal(16,2),
    castka decimal(16,2),
    id_vazby integer,
    typ_vazby char(2),
    id_vazby2 integer,
    typ_vazby2 char(2),
    c_pole1 char(12),
    c_pole2 char(10),
    id_budgetu integer,
    guid char(36),
    poznamka char(300)
  );
revoke all on "mzdy".prtl_porizovak from "public";

create  index "mzdy".ix_prtl_poriz on "mzdy".prtl_porizovak (id_poz);
create  index "mzdy".ix_prtl_poriz2 on "mzdy".prtl_porizovak (os_cislo, cislo_pom);
create  index "mzdy".ix_prtl_poriz3 on "mzdy".prtl_porizovak (kod);
create  index "mzdy".ix_prtl_poriz4 on "mzdy".prtl_porizovak (guid);
{ TABLE "mzdy".prtl_prescasy row size = 0 number of columns = 9 index size = 0 }
{ unload file name = prtl_prescasy.unl number of rows = 0 }
create table "mzdy".prtl_prescasy 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom decimal(10,0) not null,
    delka integer not null,
    prac_str char(10),
    datum date not null,
    obdobi date not null,
    co integer not null,
    davka integer
  );
revoke all on "mzdy".prtl_prescasy from "public";

create  index "mzdy".ix_prtl_prescasy on "mzdy".prtl_prescasy (os_cislo, datum);
{ TABLE "mzdy".prtl_radprava_vyj row size = 0 number of columns = 2 index size = 0 }
{ unload file name = prtl_radprava_vyj.unl number of rows = 0 }
create table "mzdy".prtl_radprava_vyj 
  (
    os_cislo decimal(10,0) not null,
    typ_prav integer not null
  );
revoke all on "mzdy".prtl_radprava_vyj from "public";

{ TABLE "mzdy".prtl_role_akce row size = 0 number of columns = 5 index size = 0 }
{ unload file name = prtl_role_akce.unl number of rows = 0 }
create table "mzdy".prtl_role_akce 
  (
    role_id integer not null,
    akce integer not null,
    stav integer not null,
    dat_od char(17) not null,
    dat_do char(17)
  );
revoke all on "mzdy".prtl_role_akce from "public";

{ TABLE "mzdy".prtl_search row size = 0 number of columns = 5 index size = 0 }
{ unload file name = prtl_search.unl number of rows = 0 }
create table "mzdy".prtl_search 
  (
    cz_lang char(255),
    sk_lang char(255),
    en_lang char(255),
    de_lang char(255),
    page_lang char(255)
  );
revoke all on "mzdy".prtl_search from "public";

{ TABLE "mzdy".prtl_sestavy row size = 0 number of columns = 8 index size = 0 }
{ unload file name = prtl_sestavy.unl number of rows = 0 }
create table "mzdy".prtl_sestavy 
  (
    id integer not null,
    sestava char(40) not null,
    stranka char(40) not null,
    nazev char(40),
    uzivatel char(64) not null,
    popis char(60),
    sloupce char(400),
    filtr char(400)
  );
revoke all on "mzdy".prtl_sestavy from "public";

create  index "mzdy".ix_prt_ss on "mzdy".prtl_sestavy (sestava, stranka);
{ TABLE "mzdy".prtl_sestavy_trid row size = 0 number of columns = 13 index size = 0 }
{ unload file name = prtl_sestavy_trid.unl number of rows = 0 }
create table "mzdy".prtl_sestavy_trid 
  (
    cislo char(10) not null,
    uzivatel char(64) not null,
    sl_1_nazev char(25),
    sl_1_trid char(1),
    sl_2_nazev char(25),
    sl_2_trid char(1),
    sl_3_nazev char(25),
    sl_3_trid char(1),
    sl_4_nazev char(25),
    sl_4_trid char(1),
    sl_5_nazev char(25),
    sl_5_trid char(1),
    radku_str integer
  );
revoke all on "mzdy".prtl_sestavy_trid from "public";

create unique  index "mzdy".ix_sest_trid on "mzdy".prtl_sestavy_trid (cislo, uzivatel);
{ TABLE "mzdy".prtl_user_setting row size = 0 number of columns = 6 index size = 0 }
{ unload file name = prtl_user_setting.unl number of rows = 0 }
create table "mzdy".prtl_user_setting 
  (
    login char(64) not null,
    stranka char(80) not null,
    objekt char(80) not null,
    polozka char(40),
    nastaveni char(40),
    id_blobu integer
  );
revoke all on "mzdy".prtl_user_setting from "public";

{ TABLE "mzdy".prtl_users row size = 0 number of columns = 11 index size = 0 }
{ unload file name = prtl_users.unl number of rows = 0 }
create table "mzdy".prtl_users 
  (
    os_cislo decimal(10,0) not null,
    login char(64) not null,
    heslo char(44),
    heslo_od date,
    spatne_heslo integer,
    zamek char(1),
    typ char(1),
    pin char(4),
    p_kod char(36),
    aktivovan char(1),
    generovane_heslo char(1)
  );
revoke all on "mzdy".prtl_users from "public";

{ TABLE "mzdy".prtl_zastup row size = 0 number of columns = 15 index size = 0 }
{ unload file name = prtl_zastup.unl number of rows = 0 }
create table "mzdy".prtl_zastup 
  (
    id integer not null,
    id_prac_mista integer,
    id_pm_zastupce integer,
    zastupovany decimal(10,0),
    zastupce decimal(10,0),
    cas_od char(17) not null,
    cas_do char(17),
    indik char(1) not null,
    role_id integer,
    uziti char(1),
    poradi integer,
    oznam char(1) not null,
    potl_delegaci integer,
    as_ulohy1 char(900),
    as_ulohy2 char(900)
  );
revoke all on "mzdy".prtl_zastup from "public";

create  index "mzdy".ix_zastup1 on "mzdy".prtl_zastup (zastupovany, zastupce, cas_od, cas_do);
create  index "mzdy".ix_zastup2 on "mzdy".prtl_zastup (zastupce, cas_od, cas_do);
create  index "mzdy".ix_zastup3 on "mzdy".prtl_zastup (id_prac_mista, zastupovany, cas_od, cas_do);
create  index "mzdy".ix_zastup4 on "mzdy".prtl_zastup (id_prac_mista, id_pm_zastupce, cas_od, cas_do);
{ TABLE "mzdy".prubeh_zam_cis row size = 0 number of columns = 13 index size = 0 }
{ unload file name = prubeh_zam_cis.unl number of rows = 688 }
create table "mzdy".prubeh_zam_cis 
  (
    os_cislo decimal(10,0) not null,
    naz_org char(100),
    mist_vyk_prace char(30),
    datum_nastupu date,
    datum_ukonc date,
    datum_format char(8),
    pozice char(100),
    duvod char(3),
    profese char(5),
    vykon_fce char(12),
    podriz integer,
    popis char(200),
    obor integer
  );
revoke all on "mzdy".prubeh_zam_cis from "public";

create  index "mzdy".ix_prubeh_zam_cis on "mzdy".prubeh_zam_cis (os_cislo);
{ TABLE "mzdy".prukazy row size = 0 number of columns = 20 index size = 0 }
{ unload file name = prukazy.unl number of rows = 1 }
create table "mzdy".prukazy 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cis_osve char(10),
    vazba_osve integer not null,
    cis_prukazu char(15),
    naz_prukazu char(50),
    vydal char(40),
    dat_vydani date,
    platnost_do date,
    poznamka char(100),
    typ_prukazu char(20),
    cesta_soubor char(200),
    nazev_soubor char(100),
    sdilene_uloziste char(150),
    id_blob integer,
    portal char(1),
    id_externi_vazby integer,
    skupina char(7),
    chip_code char(20),
    system_pouziti integer
  );
revoke all on "mzdy".prukazy from "public";

create  index "mzdy".ix_prukazy_exter on "mzdy".prukazy (id_externi_vazby);
create  index "mzdy".ix_prukazy_osve on "mzdy".prukazy (os_cislo, cis_osve, dat_vydani);
{ TABLE "mzdy".rozh_pracovnik row size = 0 number of columns = 2 index size = 0 }
{ unload file name = rozh_pracovnik.unl number of rows = 0 }
create table "mzdy".rozh_pracovnik 
  (
    id_dok integer not null,
    os_cislo decimal(10,0) not null
  );
revoke all on "mzdy".rozh_pracovnik from "public";

create unique  index "mzdy".ix_rozhprac on "mzdy".rozh_pracovnik (id_dok, os_cislo);
{ TABLE "mzdy".rozh_sablony row size = 0 number of columns = 7 index size = 0 }
{ unload file name = rozh_sablony.unl number of rows = 0 }
create table "mzdy".rozh_sablony 
  (
    id_sablony integer not null,
    nazev char(50) not null,
    dat_vytvoreni date not null,
    vytvoril char(32) not null,
    sablona byte,
    povol_uctarne integer,
    archiv integer
  );
revoke all on "mzdy".rozh_sablony from "public";

{ TABLE "mzdy".rucni row size = 0 number of columns = 15 index size = 0 }
{ unload file name = rucni.unl number of rows = 0 }
create table "mzdy".rucni 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    prac_str char(10),
    kod integer,
    c_dokladu integer,
    dat_od date,
    dat_do date,
    dny decimal(5,1),
    hodiny decimal(7,2),
    sazba decimal(16,2),
    castka decimal(16,2),
    prizn_aut char(1),
    prac_kateg integer,
    datum date,
    id_podniku integer
  );
revoke all on "mzdy".rucni from "public";

create  index "mzdy".ix_ruc on "mzdy".rucni (os_cislo);
{ TABLE "mzdy".rucni_zmeny row size = 0 number of columns = 7 index size = 0 }
{ unload file name = rucni_zmeny.unl number of rows = 0 }
create table "mzdy".rucni_zmeny 
  (
    id integer not null,
    obdobi date not null,
    tabulka char(18) not null,
    operace char(128) not null,
    os_cislo decimal(10,0),
    datum_zmeny date not null,
    cas_zmeny integer
  );
revoke all on "mzdy".rucni_zmeny from "public";

{ TABLE "mzdy".rucni2 row size = 0 number of columns = 20 index size = 0 }
{ unload file name = rucni2.unl number of rows = 609 }
create table "mzdy".rucni2 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    prac_str char(10),
    kod integer not null,
    dny decimal(5,1),
    hodiny decimal(7,2),
    trida integer,
    mzd_stup integer,
    sazba decimal(16,2),
    castka decimal(16,2),
    datum date not null,
    id_poz integer,
    id_vazby integer,
    typ_vazby char(2),
    id_vazby2 integer,
    typ_vazby2 char(2),
    import char(1),
    davka integer,
    c_pole1 char(12),
    c_pole2 char(10)
  );
revoke all on "mzdy".rucni2 from "public";

create  index "mzdy".ix_rucni22 on "mzdy".rucni2 (datum);
create  index "mzdy".ix_rucni2 on "mzdy".rucni2 (os_cislo, cislo_pom);
{ TABLE "mzdy".rowgenerator row size = 0 number of columns = 1 index size = 0 }
{ unload file name = rowgenerator.unl number of rows = 0 }
create table "mzdy".rowgenerator 
  (
    row_num integer not null
  );
revoke all on "mzdy".rowgenerator from "public";

{ TABLE "mzdy".s_doh_utajeni row size = 0 number of columns = 4 index size = 0 }
{ unload file name = s_doh_utajeni.unl number of rows = 0 }
create table "mzdy".s_doh_utajeni 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    datum_od date not null,
    stupen char(1)
  );
revoke all on "mzdy".s_doh_utajeni from "public";

{ TABLE "mzdy".s_dokl_rady row size = 0 number of columns = 4 index size = 0 }
{ unload file name = s_dokl_rady.unl number of rows = 0 }
create table "mzdy".s_dokl_rady 
  (
    rok integer not null,
    nazev char(7) not null,
    druh_pom char(1) not null,
    pz integer not null
  );
revoke all on "mzdy".s_dokl_rady from "public";

{ TABLE "mzdy".s_hz_hodn row size = 0 number of columns = 4 index size = 0 }
{ unload file name = s_hz_hodn.unl number of rows = 15 }
create table "mzdy".s_hz_hodn 
  (
    id integer not null,
    id_nazev integer not null,
    stara char(70) not null,
    nova char(70)
  );
revoke all on "mzdy".s_hz_hodn from "public";

create  index "mzdy".ix_s_hz_st on "mzdy".s_hz_hodn (stara);
{ TABLE "mzdy".s_hz_zmeny row size = 0 number of columns = 8 index size = 0 }
{ unload file name = s_hz_zmeny.unl number of rows = 6046 }
create table "mzdy".s_hz_zmeny 
  (
    id_nazev integer not null,
    tabulka char(20) not null,
    sloupec char(20) not null,
    stara char(70),
    nova char(70),
    uziv char(64) not null,
    datum date not null,
    cas char(6) not null
  );
revoke all on "mzdy".s_hz_zmeny from "public";

create  index "mzdy".ix_s_hz_z1 on "mzdy".s_hz_zmeny (id_nazev, tabulka);
create  index "mzdy".ix_s_hz_z2 on "mzdy".s_hz_zmeny (id_nazev, tabulka, sloupec);
create  index "mzdy".ix_s_hz_z3 on "mzdy".s_hz_zmeny (id_nazev, uziv);
{ TABLE "mzdy".rzdane_rp row size = 0 number of columns = 8 index size = 0 }
{ unload file name = rzdane_rp.unl number of rows = 0 }
create table "mzdy".rzdane_rp 
  (
    rok integer not null,
    os_cislo decimal(10,0) not null,
    poradi integer not null,
    id_rod_prisl integer not null,
    mes integer not null,
    narok decimal(16,2) not null,
    bonus decimal(16,2) not null,
    priznak char(1) not null
  );
revoke all on "mzdy".rzdane_rp from "public";

create unique  index "mzdy".ix_rzdane_rp on "mzdy".rzdane_rp (rok, os_cislo, poradi, id_rod_prisl, mes);
{ TABLE "mzdy".rzdane row size = 0 number of columns = 93 index size = 0 }
{ unload file name = rzdane.unl number of rows = 7615 }
create table "mzdy".rzdane 
  (
    rok integer not null,
    os_cislo decimal(10,0) not null,
    poradi integer not null,
    poradi_datum date,
    zmenil char(64),
    provest char(1),
    mesic integer,
    datum date,
    prijmy decimal(16,2),
    prijmy_doh decimal(16,2),
    pojist decimal(16,2),
    pojist_sp decimal(16,2),
    pojist_zp decimal(16,2),
    dan decimal(16,2),
    sleva decimal(16,2),
    bonus decimal(16,2),
    mprijmy decimal(16,2),
    mprijmy_doh decimal(16,2),
    mpojist decimal(16,2),
    mpojist_sp decimal(16,2),
    mpojist_zp decimal(16,2),
    mdan decimal(16,2),
    msleva decimal(16,2),
    mbonus decimal(16,2),
    srazk_dan decimal(16,2),
    zam_premie integer,
    zam_premie_zakl decimal(16,2),
    zam_premie_pocm integer,
    mzam_premie_zakl decimal(16,2),
    mzam_premie_pocm integer,
    zam_premie_uprzak decimal(16,2),
    zam_premie_castka decimal(16,2),
    odp_zakl decimal(16,2),
    odp_zakl_opr decimal(16,2),
    vyse_duch decimal(16,2),
    odp_manzel decimal(16,2),
    odp_manzel_opr decimal(16,2),
    odp_manzel_prijmy decimal(16,2),
    odp_manzel_mes integer,
    odp_cinv decimal(16,2),
    odp_cinv_opr decimal(16,2),
    odp_pinv decimal(16,2),
    odp_pinv_opr decimal(16,2),
    odp_ztpp decimal(16,2),
    odp_ztpp_opr decimal(16,2),
    odp_stud decimal(16,2),
    odp_stud_opr decimal(16,2),
    odp_dar decimal(16,2),
    odp_dar_neupr decimal(16,2),
    odp_zkouska decimal(16,2),
    prip_zkouska decimal(16,2),
    odp_ucel_spor decimal(16,2),
    odp_uroky_mes decimal(16,2),
    odp_uroky_skut decimal(16,2),
    odp_uroky_neupr decimal(16,2),
    odp_penz_mes decimal(16,2),
    odp_penz_skut decimal(16,2),
    odp_penz_neupr decimal(16,2),
    odp_zivp_mes decimal(16,2),
    odp_zivp_skut decimal(16,2),
    odp_zivp_neupr decimal(16,2),
    odp_odbp_mes decimal(16,2),
    odp_odbp_skut decimal(16,2),
    odp_odbp_neupr decimal(16,2),
    nezdan_celkem decimal(16,2),
    sleva_celkem decimal(16,2),
    zdan_mzda decimal(16,2),
    srazit_vse integer,
    poukaz_dan integer,
    odp_deti decimal(16,2),
    odp_deti_opr decimal(16,2),
    sleva_skut decimal(16,2),
    bonus_skut decimal(16,2),
    dan_skut decimal(16,2),
    dan_skut_sleva decimal(16,2),
    dan_skut_sleva1 decimal(16,2),
    dan_rozdil decimal(16,2),
    dan_rozdil1 decimal(16,2),
    bonus_rozdil decimal(16,2),
    kompenzace decimal(16,2),
    vyplaceno decimal(16,2),
    je_ok char(1),
    pocdeti integer,
    mesdeti integer,
    bonus2 decimal(16,2),
    cinnost1pol char(1),
    mbonus2 decimal(16,2),
    mcinnost1pol char(1),
    odp_deti2 decimal(16,2),
    odp_deti_opr2 decimal(16,2),
    dan_nerez90 char(1),
    typ_bonus_ur char(1),
    odp_pece decimal(16,2)
  );
revoke all on "mzdy".rzdane from "public";

create unique  index "mzdy".ix_rzdane on "mzdy".rzdane (rok, os_cislo, poradi);
{ TABLE "mzdy".s_kor_absence row size = 0 number of columns = 34 index size = 0 }
{ unload file name = s_kor_absence.unl number of rows = 0 }
create table "mzdy".s_kor_absence 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    kod integer not null,
    c_dokladu integer not null,
    dat_od date not null,
    dat_do date,
    dny decimal(3,1),
    hodiny decimal(5,2),
    hrub_prum decimal(16,2),
    vypoc_prum decimal(16,2),
    zpet_propl char(1),
    datum date not null,
    cis_rozhod_ext char(20),
    dny2 decimal(5,1),
    ind_prum char(1),
    uzivatel char(64),
    pokr_abs char(1),
    zdroj char(1),
    davka integer,
    hodiny_posl decimal(5,2),
    dny3 decimal(5,1),
    poznamka char(60),
    dny_nahr decimal(3,1),
    hodiny_nahr decimal(5,2),
    umyslna char(1),
    dat_pom date,
    prizn1 char(1),
    skut_dat_od date,
    id_poz integer,
    placene_ocr char(1),
    pandemie char(1),
    izolacka char(1),
    nova_abs char(1),
    otc_jako_rd char(1)
  );
revoke all on "mzdy".s_kor_absence from "public";

create  index "mzdy".s_kor_ix_abs10 on "mzdy".s_kor_absence (os_cislo, datum);
create  index "mzdy".s_kor_ix_abs_cd10 on "mzdy".s_kor_absence (c_dokladu);
create  index "mzdy".s_kor_ix_abs_idp10 on "mzdy".s_kor_absence (id_poz);
{ TABLE "mzdy".s_kor_odmeny row size = 0 number of columns = 28 index size = 0 }
{ unload file name = s_kor_odmeny.unl number of rows = 0 }
create table "mzdy".s_kor_odmeny 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    prac_str char(10) not null,
    kod integer not null,
    c_dokladu integer not null,
    tarif decimal(16,2),
    odprac_hod decimal(7,2),
    prem_cast decimal(16,2),
    vyp_castka integer,
    castka decimal(16,2),
    vznik date,
    dat_do date,
    dny decimal(5,1),
    datum date not null,
    zakazka char(12),
    davka integer,
    soub_davka integer,
    vytvoril char(32),
    id_navrhu integer,
    id_vazby integer,
    typ_vazby char(2),
    id_vazby2 integer,
    typ_vazby2 char(2),
    castka_cizi decimal(16,2),
    mena_cizi char(3),
    kurz_cizi decimal(16,4),
    param1 decimal(7,2),
    param2 decimal(7,2)
  );
revoke all on "mzdy".s_kor_odmeny from "public";

create  index "mzdy".s_kor_ix_odm10 on "mzdy".s_kor_odmeny (os_cislo, datum);
create  index "mzdy".s_kor_ix_odm110 on "mzdy".s_kor_odmeny (vyp_castka, datum);
{ TABLE "mzdy".s_kor_pich row size = 0 number of columns = 19 index size = 0 }
{ unload file name = s_kor_pich.unl number of rows = 0 }
create table "mzdy".s_kor_pich 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    prac_str char(10) not null,
    kod integer not null,
    c_dokladu integer,
    dat_od date,
    dat_do date,
    dny decimal(5,1),
    hodiny decimal(7,2),
    sazba decimal(16,2),
    castka decimal(16,2) not null,
    prizn_aut char(1) not null,
    prac_kateg integer not null,
    datum date not null,
    id_podniku integer not null,
    id_vazby integer,
    typ_vazby char(2),
    id_vazby2 integer,
    typ_vazby2 char(2)
  );
revoke all on "mzdy".s_kor_pich from "public";

create  index "mzdy".s_1_ix_pich10 on "mzdy".s_kor_pich (os_cislo, datum);
create  index "mzdy".s_1_ix_kod10 on "mzdy".s_kor_pich (kod, datum);
create  index "mzdy".s_1_ix_pich_dat10 on "mzdy".s_kor_pich (datum, kod, prac_str);
create  index "mzdy".s_1_ix_pich_osk10 on "mzdy".s_kor_pich (os_cislo, kod, datum);
create  index "mzdy".s_1_ix_pich_110 on "mzdy".s_kor_pich (os_cislo, datum, kod);
create  index "mzdy".s_1_ix_pich_310 on "mzdy".s_kor_pich (kod, os_cislo, cislo_pom, datum);
create  index "mzdy".s_1_ix_pich_410 on "mzdy".s_kor_pich (os_cislo, cislo_pom, datum);
create  index "mzdy".s_1_ix_pich_510 on "mzdy".s_kor_pich (os_cislo, cislo_pom, kod, datum);
create  index "mzdy".s_1_ix_pich_610 on "mzdy".s_kor_pich (prac_str, kod, datum);
create  index "mzdy".s_1_ix_pich_710 on "mzdy".s_kor_pich (typ_vazby, id_vazby);
create  index "mzdy".s_1_ix_pich_810 on "mzdy".s_kor_pich (typ_vazby2, id_vazby2);
create  index "mzdy".s_1_ix_pich_910 on "mzdy".s_kor_pich (os_cislo, cislo_pom, kod, c_dokladu, dat_od, dat_do);
{ TABLE "mzdy".s_kor_prac_pom row size = 0 number of columns = 136 index size = 0 }
{ unload file name = s_kor_prac_pom.unl number of rows = 0 }
create table "mzdy".s_kor_prac_pom 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    druh_pom char(1) not null,
    doba_uvazku char(1) not null,
    prac_str char(10) not null,
    skup_prac char(7),
    prac_kateg integer,
    jkz integer,
    pov_funkce char(12),
    mzd_stup integer,
    trida integer,
    typ_tt integer not null,
    zak_uvazek decimal(4,2) not null,
    hod_uvazek decimal(4,2) not null,
    smena integer,
    duvod_kratsi char(1),
    typ_kal integer not null,
    rozp_kateg char(3),
    vykaz char(3),
    rez_zakazka char(10),
    typ_mzdy integer not null,
    tarif decimal(16,2) not null,
    os_hodn decimal(16,2),
    tarif_cizi decimal(16,4),
    kurz_cizi decimal(16,4),
    pripl_vedeni decimal(16,2),
    pripl_zvlastni decimal(16,2),
    typ_premii integer,
    prem_cast decimal(16,2),
    odpr_pro_dov integer not null,
    neodpr_dny integer not null,
    ex_dov char(1),
    navaz_dov char(1),
    dov_narok decimal(3,1) not null,
    dov_cerpana decimal(5,2) not null,
    dov_kracena decimal(5,2) not null,
    dov_predmin decimal(5,2),
    zbyv_rd_min_rok decimal(5,2) not null,
    rd_letos decimal(5,2) not null,
    dov_dodatk_r decimal(5,2),
    dov_dodatk decimal(5,2),
    trv_dov char(1) not null,
    trv_nem char(1) not null,
    dny_ro_dov decimal(5,1) not null,
    hod_ro_dov decimal(7,2) not null,
    kcs_dov decimal(16,2) not null,
    kcs_dov_1 decimal(16,2) not null,
    kcs_dov_2 decimal(16,2) not null,
    kcs_dov_3 decimal(16,2) not null,
    kcs_dov_4 decimal(16,2) not null,
    prum_dov decimal(16,2),
    min_prum_dov decimal(16,2),
    dny_ro_nem decimal(6,1) not null,
    kcs_nem decimal(16,2) not null,
    prum_nem decimal(16,2),
    min_prum_nem decimal(16,2),
    dny_nemoci integer not null,
    praxe integer,
    praxe_dny integer,
    min_zakl decimal(16,2),
    min_pripl decimal(16,2),
    min_uvazek decimal(4,2),
    min_min_mzda decimal(16,2),
    potl_min_mzdy char(1),
    datum_nastupu date not null,
    duvod_nast char(3),
    datum_zmeny date,
    datum_ukonc date,
    duvod_ukonc char(3),
    zac_nem_poj date,
    eldp_1znak char(1),
    eldp_3znak char(1),
    eldp_akt char(1),
    eldp_nezahrn char(1),
    druh_pom_j char(2),
    zk_doba date,
    kl_po_zam char(4),
    zap_praxe char(8),
    zap_praxe_od date,
    zvys_ps_mes integer,
    zvys_ps_rok integer,
    zvys_ps_dat date,
    id_pracmist integer,
    id_pracmist_2 integer,
    datum_pr_sml date,
    datum_plan_odch date,
    datum_skut_nast date,
    premie_proc_ind decimal(5,2),
    dov_generovat char(1),
    dov_kratit char(1),
    doplnkova_1 char(50),
    doplnkova_2 date,
    cislo_platvym integer,
    cislo_dodatsml integer,
    nahr_hod_uvazek decimal(4,2),
    nahr_typ_kal integer,
    nahr_smena integer,
    jen_duchpoj char(1),
    maly_rozsah char(1),
    dat_doruc_vypov date,
    ucast_duchp_od date,
    misto_vykonu char(50),
    kpd_od date,
    kpd_do date,
    kpd_prum decimal(16,4),
    prum_rok decimal(16,4),
    vychozi_pomer integer,
    c_kmen_pom integer,
    isco08 char(7),
    ind_dn_sk char(1),
    zpusob_ukonc char(7),
    model_pd char(10),
    doch_karta char(15),
    mespr_vypl_nepr char(1),
    id_rez_projekt integer,
    tyd_prac_doba char(1),
    smluv_pom_uv decimal(6,4),
    mes_pom_uv decimal(6,4),
    prum_pom_uv decimal(6,4),
    cislo_sluz_oznac char(3),
    mesice_pracurad integer,
    eldp_vyd_cin_od date,
    legislat_uvazek decimal(4,2),
    id_agentury integer,
    vynimka char(1),
    zpracov_mzdy char(7),
    zpracov_pers char(7),
    mena_cizi char(3),
    ic_prav_vztahu char(15),
    doplnkova_3 char(10),
    odvod_odp_pol_od date,
    odvod_odp_pol_do date,
    naroc_prof_produch char(1),
    garance_castka decimal(16,2),
    homeof_typ_kal integer,
    homeof_smena integer
  );
revoke all on "mzdy".s_kor_prac_pom from "public";

create  index "mzdy".s_kor_ix_pom10 on "mzdy".s_kor_prac_pom (os_cislo);
create unique  index "mzdy".s_kor_ix_pom210 on "mzdy".s_kor_prac_pom (os_cislo, cislo_pom);
create  index "mzdy".s_kor_ix_pom310 on "mzdy".s_kor_prac_pom (os_cislo, datum_nastupu, datum_ukonc);
create  index "mzdy".s_kor_ix_pom410 on "mzdy".s_kor_prac_pom (datum_nastupu);
create  index "mzdy".s_kor_ix_pom510 on "mzdy".s_kor_prac_pom (datum_ukonc);
{ TABLE "mzdy".s_kor_prac_postup row size = 0 number of columns = 22 index size = 0 }
{ unload file name = s_kor_prac_postup.unl number of rows = 0 }
create table "mzdy".s_kor_prac_postup 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    platnost_od date not null,
    platnost_do date,
    id_pracmist integer,
    trida integer,
    mzd_stup integer,
    tarif decimal(16,2) not null,
    os_hodn decimal(16,2),
    prem_cast decimal(16,2),
    pripl_vedeni decimal(16,2),
    pripl_zvlastni decimal(16,2),
    typ_mzdy integer not null,
    prac_str char(10) not null,
    jkz integer,
    prac_kateg integer,
    smena integer,
    typ_kal integer not null,
    hod_uvazek decimal(4,2) not null,
    smluv_pom_uv decimal(6,4) not null,
    poznamka char(160),
    garance_castka decimal(16,2)
  );
revoke all on "mzdy".s_kor_prac_postup from "public";

create unique  index "mzdy".s_kor_ix_postup10 on "mzdy".s_kor_prac_postup (os_cislo, cislo_pom, platnost_od, platnost_do);
create  index "mzdy".s_kor_ix_postup_mi on "mzdy".s_kor_prac_postup (id_pracmist, platnost_od, platnost_do);
{ TABLE "mzdy".s_kor_pracovnici row size = 0 number of columns = 159 index size = 0 }
{ unload file name = s_kor_pracovnici.unl number of rows = 0 }
create table "mzdy".s_kor_pracovnici 
  (
    os_cislo decimal(10,0),
    prijmeni char(40),
    jmeno char(40),
    titul char(25),
    rodne_jmeno char(40),
    rodne_cislo char(10),
    misto_narozeni char(48),
    rodin_stav char(1),
    narodnost char(2),
    st_prisl char(3),
    cislo_op char(12),
    cislo_pasu char(12),
    bran_pov char(2),
    ulice_trv char(45),
    tr_ulice char(30),
    tr_cislo char(14),
    misto_trv char(48),
    psc_trv char(5),
    posta_trv char(48),
    ulice_prech char(45),
    pr_ulice char(30),
    pr_cislo char(14),
    misto_prech char(48),
    psc_prech char(5),
    posta_prech char(48),
    kmen_str char(10),
    vypl_str integer,
    zaloha decimal(16,2),
    prech_zal integer,
    druh_slevy integer,
    zmen_prac_sch char(2),
    vyziv_os_nvc integer,
    vyziv_os_exm integer,
    druh_duchodu char(3),
    duchod_od date,
    clen_roh char(1),
    vybor_oh integer,
    datum_nastupu date,
    datum_vystupu date,
    datum_zmeny date,
    uhrn_mezd_letos decimal(16,2),
    uhrn_dohod decimal(16,2),
    kal_dny_dohod integer not null,
    uhrn_pojist decimal(16,2),
    dan_sleva char(1),
    sleva_od date,
    student char(1) not null,
    uhrn_dan_zakl decimal(16,2),
    uhrn_dani decimal(16,2),
    dan_zakl_cizi decimal(16,2) not null,
    dan_cizi decimal(16,2) not null,
    uhrn_nem decimal(16,2) not null,
    zakl_sraz_dan decimal(16,2) not null,
    srazk_dan decimal(16,2) not null,
    m_dan_zakl_cizi decimal(16,2) not null,
    m_dan_cizi decimal(16,2) not null,
    m_uhrn_nem decimal(16,2) not null,
    m_zakl_sraz_dan decimal(16,2) not null,
    m_srazk_dan decimal(16,2) not null,
    rocni_zuct char(1),
    m_dan_zakl decimal(16,2),
    m_dan decimal(16,2),
    rocni_odpoc decimal(16,2),
    odpoc_duch integer,
    odpoc_manz decimal(16,2),
    odpoc_dary decimal(16,2),
    dan_roc_zakl decimal(16,2),
    zust_minci decimal(16,2),
    dluh decimal(16,2),
    kal_dny integer,
    nahr_dny integer,
    kcs_duchod decimal(16,2),
    vek_duchod integer,
    mes_duchod decimal(3,1),
    odpr_roky_dov integer,
    odpr_dny_dov integer,
    zam_roky integer,
    zam_dny integer,
    zdrav_poj integer,
    zdrav_poj_od date,
    min_zdrav_poj integer,
    cis_poj_cizi char(10),
    deti_pro_duch integer,
    uhrn_dan_z_c decimal(16,2),
    uhrn_pojist_c decimal(16,2),
    eldp_adr char(1),
    eldp_zahr char(1),
    eldp_kod_st integer,
    nepoc_soc integer,
    kontr_podp_doby integer,
    prihl_jm char(128),
    model_pd char(10),
    titul_za char(25),
    sleva_do date,
    zps_od date,
    zps_do date,
    dan_nerez char(1),
    stravenky char(1),
    bez_dane char(1),
    datum_1_nast date,
    duchod_do date,
    op_plat date,
    pas_plat date,
    dat_duch_predp date,
    souhlas_cud char(1),
    souhlas_cud_mzd char(1),
    uhrn_dsleva decimal(16,2),
    uhrn_dbonus decimal(16,2),
    m_dsleva decimal(16,2),
    m_dbonus decimal(16,2),
    dsleva_cizi decimal(16,2),
    dbonus_cizi decimal(16,2),
    id_agentury integer,
    id_firmy integer,
    uhrn_superhr decimal(16,2),
    uhrn_sp_firma decimal(16,2),
    uhrn_zp_firma decimal(16,2),
    soc_uhrn_vz decimal(16,2),
    zdrav_uhrn_vz decimal(16,2),
    soc_uhrn_vz_x decimal(16,2),
    zdrav_uhrn_vz_x decimal(16,2),
    druhy_pilier_sk char(1),
    zac_nem_poj date,
    duch_poj_ciz char(1),
    prech_stat_adr char(2),
    trv_postcode char(11),
    prech_postcode char(11),
    cssz_ecp char(10),
    doch_karta char(15),
    okres_nar char(20),
    stat_nar char(2),
    stat_adr char(2),
    id_podniku integer not null,
    e101 char(1),
    znc_max decimal(16,2),
    uhrn_soc_poj decimal(16,2),
    uhrn_zdrav_poj decimal(16,2),
    cislo_duch_spor char(10),
    smluv_netto decimal(16,2),
    smluv_netto_cizi decimal(16,2),
    uhrn_dohod_cizi decimal(16,2),
    uhrn_sp_cizi decimal(16,2),
    uhrn_zp_cizi decimal(16,2),
    evid_cislo char(32),
    odpoc_zp char(1),
    dcis_nerezidenta char(20),
    typdcis_nerezid char(1),
    statdcis_nerezid char(2),
    cdokl_nerezid char(15),
    typdokl_nerezid char(1),
    statdokl_nerezid char(2),
    dat_ukonczam_cr date,
    doktorand char(1),
    prijmy_doh decimal(16,2),
    vydavatel_pasu char(40),
    dat_zacatkuzam_cr date,
    sleva_sp_fir_stav char(1),
    sleva_sp_fir_druh char(1),
    sleva_sp_duch char(1)
  );
revoke all on "mzdy".s_kor_pracovnici from "public";

create unique  index "mzdy".s_kor_ix_prac10 on "mzdy".s_kor_pracovnici (os_cislo);
create  index "mzdy".s_kor_ix_pri10 on "mzdy".s_kor_pracovnici (prijmeni, jmeno);
create unique  index "mzdy".s_kor_ix_prac_str1 on "mzdy".s_kor_pracovnici (kmen_str, os_cislo);
create unique  index "mzdy".s_kor_ix_prac_idpo on "mzdy".s_kor_pracovnici (id_podniku, os_cislo, datum_vystupu);
create  index "mzdy".s_kor_ix_pracovn_r on "mzdy".s_kor_pracovnici (rodne_cislo);
create  index "mzdy".s_kor_ix_pra_stra1 on "mzdy".s_kor_pracovnici (stravenky);
create  index "mzdy".s_kor_ix_prac_110 on "mzdy".s_kor_pracovnici (id_podniku, os_cislo, prijmeni, jmeno, titul, rodne_jmeno);
create  index "mzdy".s_kor_ix_prac_210 on "mzdy".s_kor_pracovnici (min_zdrav_poj, id_podniku, os_cislo);
{ TABLE "mzdy".s_kor_priplatky row size = 0 number of columns = 15 index size = 0 }
{ unload file name = s_kor_priplatky.unl number of rows = 0 }
create table "mzdy".s_kor_priplatky 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    kod integer,
    castka decimal(16,2),
    disp_str char(10),
    plati_od date,
    plati_do date,
    agenda char(20),
    perioda integer,
    castka_cizi decimal(16,2),
    mena_cizi char(3),
    kurz_cizi decimal(16,4),
    id_vazby integer,
    typ_vazby char(2),
    pozn char(60)
  );
revoke all on "mzdy".s_kor_priplatky from "public";

create  index "mzdy".s_kor_ix_pripl10 on "mzdy".s_kor_priplatky (os_cislo);
create  index "mzdy".s_kor_ix_pripl_dat10 on "mzdy".s_kor_priplatky (os_cislo, plati_od, plati_do);
create  index "mzdy".s_kor_ix_pripl_ag10 on "mzdy".s_kor_priplatky (os_cislo, cislo_pom, kod, agenda);
{ TABLE "mzdy".s_kor_rucni2 row size = 0 number of columns = 20 index size = 0 }
{ unload file name = s_kor_rucni2.unl number of rows = 0 }
create table "mzdy".s_kor_rucni2 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    prac_str char(10),
    kod integer not null,
    dny decimal(5,1),
    hodiny decimal(7,2),
    trida integer,
    mzd_stup integer,
    sazba decimal(16,2),
    castka decimal(16,2),
    datum date not null,
    id_poz integer,
    id_vazby integer,
    typ_vazby char(2),
    id_vazby2 integer,
    typ_vazby2 char(2),
    import char(1),
    davka integer,
    c_pole1 char(12),
    c_pole2 char(10)
  );
revoke all on "mzdy".s_kor_rucni2 from "public";

create  index "mzdy".s_kor_ix_rucni2210 on "mzdy".s_kor_rucni2 (datum);
create  index "mzdy".s_kor_ix_rucni210 on "mzdy".s_kor_rucni2 (os_cislo, cislo_pom);
{ TABLE "mzdy".s_kor_vysl row size = 0 number of columns = 19 index size = 0 }
{ unload file name = s_kor_vysl.unl number of rows = 0 }
create table "mzdy".s_kor_vysl 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    prac_str char(10) not null,
    kod integer not null,
    c_dokladu integer,
    dat_od date,
    dat_do date,
    dny decimal(5,1),
    hodiny decimal(7,2),
    sazba decimal(16,2),
    castka decimal(16,2) not null,
    prizn_aut char(1) not null,
    prac_kateg integer,
    datum date not null,
    id_podniku integer not null,
    id_vazby integer,
    typ_vazby char(2),
    id_vazby2 integer,
    typ_vazby2 char(2)
  );
revoke all on "mzdy".s_kor_vysl from "public";

create  index "mzdy".s_kor_s_1_ix_pich11 on "mzdy".s_kor_vysl (os_cislo, datum);
create  index "mzdy".s_kor_s_1_ix_kod11 on "mzdy".s_kor_vysl (kod, datum);
create  index "mzdy".s_kor_s_1_ix_pich_dat11 on "mzdy".s_kor_vysl (datum, kod, prac_str);
create  index "mzdy".s_kor_s_1_ix_pich_osk11 on "mzdy".s_kor_vysl (os_cislo, kod, datum);
create  index "mzdy".s_kor_s_1_ix_pich_111 on "mzdy".s_kor_vysl (os_cislo, datum, kod);
create  index "mzdy".s_kor_s_1_ix_pich_311 on "mzdy".s_kor_vysl (kod, os_cislo, cislo_pom, datum);
create  index "mzdy".s_kor_s_1_ix_pich_411 on "mzdy".s_kor_vysl (os_cislo, cislo_pom, datum);
create  index "mzdy".s_kor_s_1_ix_pich_511 on "mzdy".s_kor_vysl (os_cislo, cislo_pom, kod, datum);
create  index "mzdy".s_kor_s_1_ix_pich_611 on "mzdy".s_kor_vysl (prac_str, kod, datum);
create  index "mzdy".s_kor_s_1_ix_pich_711 on "mzdy".s_kor_vysl (typ_vazby, id_vazby);
create  index "mzdy".s_kor_s_1_ix_pich_811 on "mzdy".s_kor_vysl (typ_vazby2, id_vazby2);
create  index "mzdy".s_kor_s_1_ix_pich_911 on "mzdy".s_kor_vysl (os_cislo, cislo_pom, kod, c_dokladu, dat_od, dat_do);
{ TABLE "mzdy".s_korekce row size = 0 number of columns = 16 index size = 0 }
{ unload file name = s_korekce.unl number of rows = 0 }
create table "mzdy".s_korekce 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    typ integer,
    kod integer,
    prac_str char(10),
    dat_od date,
    dat_do date,
    dny decimal(7,1),
    hodiny decimal(7,2),
    sazba decimal(16,2),
    castka decimal(16,2),
    datum_obd date,
    datum date,
    prizn_aut char(1),
    zpracovat integer,
    dodatek integer
  );
revoke all on "mzdy".s_korekce from "public";

create  index "mzdy".ix_skor_osc on "mzdy".s_korekce (os_cislo, cislo_pom, datum);
create  index "mzdy".ix_skor_kod on "mzdy".s_korekce (typ, kod, datum, datum_obd);
{ TABLE "mzdy".s_prava_dispstr row size = 0 number of columns = 3 index size = 0 }
{ unload file name = s_prava_dispstr.unl number of rows = 0 }
create table "mzdy".s_prava_dispstr 
  (
    prihl_jm char(24) not null,
    disp_str char(10),
    os_cislo decimal(10,0)
  );
revoke all on "mzdy".s_prava_dispstr from "public";

{ TABLE "mzdy".s_praxe_pom row size = 0 number of columns = 12 index size = 0 }
{ unload file name = s_praxe_pom.unl number of rows = 0 }
create table "mzdy".s_praxe_pom 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    trida integer,
    mzd_stup integer,
    tarif decimal(16,2),
    zap_praxe char(6),
    zap_praxe_dat date,
    pov_trida integer,
    pov_mzd_stup integer,
    pov_tarif decimal(16,2),
    pov_zap_praxe char(6),
    pov_zap_praxe_dat date
  );
revoke all on "mzdy".s_praxe_pom from "public";

{ TABLE "mzdy".s_pre_bank_spoj row size = 0 number of columns = 25 index size = 0 }
{ unload file name = s_pre_bank_spoj.unl number of rows = 0 }
create table "mzdy".s_pre_bank_spoj 
  (
    id integer not null,
    id_bank_spoj integer,
    id_osoby integer not null,
    typ char(2) not null,
    dat_od date not null,
    nazev char(20),
    cislo_banky char(4),
    cislo_uctu char(20),
    cislo_banky_n char(4) not null,
    cislo_uctu_n char(20) not null,
    konst_symb char(4),
    var_symb char(11),
    spec_symb char(11),
    stav char(1) not null,
    dokl_rada char(7),
    c_dokladu integer,
    verze integer,
    dat_vloz date not null,
    cas_vloz char(6) not null,
    kdo_vloz char(32) not null,
    duvod_vloz char(80),
    dat_kontr date,
    cas_kontr char(6),
    kdo_kontr char(32),
    aktivni char(1) not null
  );
revoke all on "mzdy".s_pre_bank_spoj from "public";

create  index "mzdy".s_ix_pba_spoj_id on "mzdy".s_pre_bank_spoj (id);
{ TABLE "mzdy".s_predbez_fk row size = 0 number of columns = 15 index size = 0 }
{ unload file name = s_predbez_fk.unl number of rows = 0 }
create table "mzdy".s_predbez_fk 
  (
    id_navrhu integer not null,
    disp_str char(10) not null,
    rozp_polozka char(10) not null,
    cis_jednaci char(20),
    datum date,
    vytvoril char(24),
    schvalil char(24),
    schvalil_dne date,
    datum_ucinnosti date,
    stav_navrhu char(1),
    duvod_vraceni char(255),
    datum_postoupeni date,
    sp_oz char(2) not null,
    kod integer not null,
    kod_rozl integer not null
  );
revoke all on "mzdy".s_predbez_fk from "public";

create  index "mzdy".ix_predbez_fk on "mzdy".s_predbez_fk (disp_str, rozp_polozka, datum);
{ TABLE "mzdy".s_predbez_fk_telo row size = 0 number of columns = 6 index size = 0 }
{ unload file name = s_predbez_fk_telo.unl number of rows = 0 }
create table "mzdy".s_predbez_fk_telo 
  (
    id_navrhu integer not null,
    por_cislo integer not null,
    os_cislo decimal(10,0),
    castka integer,
    duvod_cis char(7),
    duvod_text char(255)
  );
revoke all on "mzdy".s_predbez_fk_telo from "public";

{ TABLE "mzdy".s_prekazky row size = 0 number of columns = 5 index size = 0 }
{ unload file name = s_prekazky.unl number of rows = 0 }
create table "mzdy".s_prekazky 
  (
    os_cislo decimal(10,0),
    prekazka_od date,
    cis_rozhod_od char(20),
    prekazka_do date,
    cis_rozhod_do char(20)
  );
revoke all on "mzdy".s_prekazky from "public";

create unique  index "mzdy".idx_s_prekazky on "mzdy".s_prekazky (os_cislo);
{ TABLE "mzdy".s_urovne row size = 0 number of columns = 4 index size = 0 }
{ unload file name = s_urovne.unl number of rows = 0 }
create table "mzdy".s_urovne 
  (
    ruroven char(2) not null,
    nazevu char(60) not null,
    vedeni decimal(7,0),
    zkratka char(15)
  );
revoke all on "mzdy".s_urovne from "public";

{ TABLE "mzdy".sc_dimenze_ppf row size = 0 number of columns = 4 index size = 0 }
{ unload file name = sc_dimenze_ppf.unl number of rows = 0 }
create table "mzdy".sc_dimenze_ppf 
  (
    id_podniku integer,
    id_dimenze integer not null,
    pouzit char(1),
    konstanta char(30)
  );
revoke all on "mzdy".sc_dimenze_ppf from "public";

{ TABLE "mzdy".sc_kodyuc_ppf row size = 0 number of columns = 38 index size = 0 }
{ unload file name = sc_kodyuc_ppf.unl number of rows = 0 }
create table "mzdy".sc_kodyuc_ppf 
  (
    id_podniku integer,
    kod_uc integer not null,
    nazev char(80),
    cinnost char(20),
    typ_ucet_doma char(1),
    typ_ucet_cizi char(1),
    typ_ucet_pref char(1),
    ucet_doma char(10),
    ucet_cizi char(10),
    ucet_pref char(10),
    typ_pucet_doma char(1),
    typ_pucet_cizi char(1),
    typ_pucet_pref char(1),
    pucet_doma char(10),
    pucet_cizi char(10),
    pucet_pref char(10),
    oucet_doma char(20),
    oucet_cizi char(20),
    oucet_pref char(20),
    ucet_doma2 char(10),
    ucet_cizi2 char(10),
    ucet_pref2 char(10),
    typ_zucet_doma char(1),
    typ_zucet_cizi char(1),
    typ_zucet_pref char(1),
    zucet_doma char(10),
    zucet_cizi char(10),
    zucet_pref char(10),
    dopl_info1 char(20),
    dopl_info2 char(20),
    dopl_info3 char(20),
    dopl_info4 char(20),
    dopl_info5 char(20),
    dopl_info6 char(20),
    dopl_info7 char(20),
    dopl_info8 char(20),
    dopl_info9 char(20),
    dopl_info10 char(20)
  );
revoke all on "mzdy".sc_kodyuc_ppf from "public";

{ TABLE "mzdy".sc_polozky_ppf row size = 0 number of columns = 4 index size = 0 }
{ unload file name = sc_polozky_ppf.unl number of rows = 0 }
create table "mzdy".sc_polozky_ppf 
  (
    id_podniku integer,
    typ integer not null,
    druh char(3) not null,
    kod_uc integer
  );
revoke all on "mzdy".sc_polozky_ppf from "public";

{ TABLE "mzdy".sc_uctyzam_ppf row size = 0 number of columns = 2 index size = 0 }
{ unload file name = sc_uctyzam_ppf.unl number of rows = 0 }
create table "mzdy".sc_uctyzam_ppf 
  (
    os_cislo decimal(10,0) not null,
    ucet char(20)
  );
revoke all on "mzdy".sc_uctyzam_ppf from "public";

{ TABLE "mzdy".serial_cols2 row size = 0 number of columns = 3 index size = 0 }
{ unload file name = serial_cols2.unl number of rows = 75 }
create table "mzdy".serial_cols2 
  (
    tabname char(18) not null,
    colname char(18) not null,
    nextval2 integer not null
  );
revoke all on "mzdy".serial_cols2 from "public";

{ TABLE "mzdy".ses_param row size = 0 number of columns = 7 index size = 0 }
{ unload file name = ses_param.unl number of rows = 0 }
create table "mzdy".ses_param 
  (
    c_sestavy integer not null,
    naz_modul char(14),
    l_okraj integer,
    h_okraj integer,
    s_okraj integer,
    poc_radku integer,
    max_sir integer
  );
revoke all on "mzdy".ses_param from "public";

create  index "mzdy".ix_ses_param on "mzdy".ses_param (c_sestavy);
{ TABLE "mzdy".ses_podmin row size = 0 number of columns = 5 index size = 0 }
{ unload file name = ses_podmin.unl number of rows = 0 }
create table "mzdy".ses_podmin 
  (
    c_sestavy integer not null,
    ls char(40),
    relace char(6),
    lp char(40),
    spo char(3)
  );
revoke all on "mzdy".ses_podmin from "public";

create  index "mzdy".ix_ses_podmin1 on "mzdy".ses_podmin (c_sestavy);
{ TABLE "mzdy".ses_seznam row size = 0 number of columns = 6 index size = 0 }
{ unload file name = ses_seznam.unl number of rows = 0 }
create table "mzdy".ses_seznam 
  (
    c_sestavy integer not null,
    soubor char(14) not null,
    popis char(50),
    sirka integer,
    obraz integer,
    indikace char(1)
  );
revoke all on "mzdy".ses_seznam from "public";

{ TABLE "mzdy".schemata_radky row size = 0 number of columns = 7 index size = 0 }
{ unload file name = schemata_radky.unl number of rows = 0 }
create table "mzdy".schemata_radky 
  (
    id integer not null,
    id_schema integer not null,
    c_radku integer not null,
    polozka char(50) not null,
    typ char(1) not null,
    uzivatel char(64) not null,
    datum_cas char(17) not null
  );
revoke all on "mzdy".schemata_radky from "public";

create  index "mzdy".ix_sch_id_sch on "mzdy".schemata_radky (id_schema);
{ TABLE "mzdy".sablony_vl row size = 0 number of columns = 3 index size = 0 }
{ unload file name = sablony_vl.unl number of rows = 17 }
create table "mzdy".sablony_vl 
  (
    id integer not null,
    cislo integer not null,
    popis char(30) not null
  );
revoke all on "mzdy".sablony_vl from "public";

{ TABLE "mzdy".seznamy_zam row size = 0 number of columns = 2 index size = 0 }
{ unload file name = seznamy_zam.unl number of rows = 0 }
create table "mzdy".seznamy_zam 
  (
    nazev char(20) not null,
    os_cislo decimal(10,0)
  );
revoke all on "mzdy".seznamy_zam from "public";

{ TABLE "mzdy".sko_cerpani row size = 0 number of columns = 9 index size = 0 }
{ unload file name = sko_cerpani.unl number of rows = 1 }
create table "mzdy".sko_cerpani 
  (
    id integer not null,
    id_fondu integer not null,
    objednavka char(15),
    faktura char(15),
    smlouva char(30),
    poznamka char(80),
    castka decimal(16,2),
    p_cislo integer,
    aut_castka char(1)
  );
revoke all on "mzdy".sko_cerpani from "public";

create  index "mzdy".ix_sko_cerp_fond on "mzdy".sko_cerpani (id_fondu, p_cislo, aut_castka, castka);
create  index "mzdy".ix_sko_cerp_akce on "mzdy".sko_cerpani (p_cislo, aut_castka, castka);
{ TABLE "mzdy".sko_cile row size = 0 number of columns = 7 index size = 0 }
{ unload file name = sko_cile.unl number of rows = 0 }
create table "mzdy".sko_cile 
  (
    os_cislo decimal(10,0),
    p_cislo integer,
    cil char(60),
    datum_od date,
    datum_do date,
    uroven integer,
    popis char(60)
  );
revoke all on "mzdy".sko_cile from "public";

create  index "mzdy".ix_cile on "mzdy".sko_cile (os_cislo, p_cislo);
{ TABLE "mzdy".sko_cisl row size = 0 number of columns = 33 index size = 0 }
{ unload file name = sko_cisl.unl number of rows = 18 }
create table "mzdy".sko_cisl 
  (
    cislo char(10) not null,
    text_osve char(60) not null,
    opakovat char(1) not null,
    perioda integer,
    id_skol char(1),
    typ char(7),
    cena decimal(16,2),
    optim_pocet integer,
    druh_osv char(2),
    akreditace_cislo char(20),
    dny_trvani integer,
    souvisl_ind_plan integer,
    dohled_nad_lhut integer,
    lhuta_mesice integer,
    lektor_preference integer,
    nepozadovat integer,
    kombin_ziskavani integer,
    omezena_platnost char(3),
    nenabizet integer,
    externi_cislo char(10),
    nazev_nezkraceny char(150),
    subcat_edumenu char(5),
    sys_vyuziti integer,
    certifikat_sid char(5),
    druh_terminu char(1),
    nabid_dopor_vzd integer,
    vyzva_k_hodnoc integer,
    hodnoc_efektivn integer,
    id_prefer_osnovy integer,
    id_blob_popis integer,
    id_blob_obraz integer,
    typ_obraz char(4),
    vkatalogu integer
  );
revoke all on "mzdy".sko_cisl from "public";

create unique  index "mzdy".ix_osve_cislo on "mzdy".sko_cisl (cislo);
{ TABLE "mzdy".sko_cisl_dilci row size = 0 number of columns = 2 index size = 0 }
{ unload file name = sko_cisl_dilci.unl number of rows = 0 }
create table "mzdy".sko_cisl_dilci 
  (
    cislo char(10),
    cislo_dilci char(10)
  );
revoke all on "mzdy".sko_cisl_dilci from "public";

create unique  index "mzdy".ix_osve_dilci on "mzdy".sko_cisl_dilci (cislo, cislo_dilci);
{ TABLE "mzdy".sko_druhy row size = 0 number of columns = 2 index size = 0 }
{ unload file name = sko_druhy.unl number of rows = 0 }
create table "mzdy".sko_druhy 
  (
    druh char(2) not null,
    popis char(120)
  );
revoke all on "mzdy".sko_druhy from "public";

{ TABLE "mzdy".sko_fondy row size = 0 number of columns = 9 index size = 0 }
{ unload file name = sko_fondy.unl number of rows = 1 }
create table "mzdy".sko_fondy 
  (
    id_fondu integer not null,
    cislo_fondu char(10) not null,
    nazev_fondu char(40),
    rok integer,
    castka decimal(16,2) not null,
    datum_od date,
    datum_do date,
    kod_planu char(10),
    castka_firplan decimal(16,2)
  );
revoke all on "mzdy".sko_fondy from "public";

create  index "mzdy".ix_skofond_cislo on "mzdy".sko_fondy (cislo_fondu, datum_od, datum_do);
create  index "mzdy".ix_skofond_id on "mzdy".sko_fondy (id_fondu, castka);
{ TABLE "mzdy".sko_hodnoceni row size = 0 number of columns = 5 index size = 0 }
{ unload file name = sko_hodnoceni.unl number of rows = 0 }
create table "mzdy".sko_hodnoceni 
  (
    os_cislo decimal(10,0) not null,
    p_cislo integer not null,
    otazka char(7) not null,
    hodnoceni decimal(4,2),
    poznamka char(250)
  );
revoke all on "mzdy".sko_hodnoceni from "public";

create  index "mzdy".ix_sko_hodn on "mzdy".sko_hodnoceni (p_cislo, os_cislo);
{ TABLE "mzdy".sko_fir_plany row size = 0 number of columns = 7 index size = 0 }
{ unload file name = sko_fir_plany.unl number of rows = 0 }
create table "mzdy".sko_fir_plany 
  (
    kod_planu char(10) not null,
    nazev_planu char(40) not null,
    datum_od date not null,
    datum_do date not null,
    stav char(1),
    uzavreno_kdy date,
    id_hz_akce_plan integer
  );
revoke all on "mzdy".sko_fir_plany from "public";

{ TABLE "mzdy".sko_fondy_stred row size = 0 number of columns = 2 index size = 0 }
{ unload file name = sko_fondy_stred.unl number of rows = 0 }
create table "mzdy".sko_fondy_stred 
  (
    id_fondu integer not null,
    str char(10) not null
  );
revoke all on "mzdy".sko_fondy_stred from "public";

{ TABLE "mzdy".sklady_prevod row size = 0 number of columns = 7 index size = 0 }
{ unload file name = sklady_prevod.unl number of rows = 0 }
create table "mzdy".sklady_prevod 
  (
    id_prevodu integer not null,
    sklad_ze char(10),
    sklad_na char(10),
    datum_expedice date not null,
    datum_prijeti date,
    uzivatel char(64) not null,
    poznamka char(80)
  );
revoke all on "mzdy".sklady_prevod from "public";

{ TABLE "mzdy".seznam_db row size = 0 number of columns = 4 index size = 0 }
{ unload file name = seznam_db.unl number of rows = 0 }
create table "mzdy".seznam_db 
  (
    nazev char(40) not null,
    popis char(120),
    poradi integer,
    ostra_data char(1)
  );
revoke all on "mzdy".seznam_db from "public";

{ TABLE "mzdy".ses_sum row size = 0 number of columns = 5 index size = 0 }
{ unload file name = ses_sum.unl number of rows = 0 }
create table "mzdy".ses_sum 
  (
    c_sestavy integer not null,
    polozka char(40),
    pol_text char(40),
    id_sum char(1),
    id_vyber char(2)
  );
revoke all on "mzdy".ses_sum from "public";

create  index "mzdy".ix_ses_sum on "mzdy".ses_sum (c_sestavy, id_vyber);
{ TABLE "mzdy".ses_trid row size = 0 number of columns = 4 index size = 0 }
{ unload file name = ses_trid.unl number of rows = 0 }
create table "mzdy".ses_trid 
  (
    c_sestavy integer not null,
    sloupec char(37) not null,
    poradi integer,
    vzest char(1)
  );
revoke all on "mzdy".ses_trid from "public";

create  index "mzdy".ix_ses_trid on "mzdy".ses_trid (c_sestavy);
{ TABLE "mzdy".ses_strukt row size = 0 number of columns = 5 index size = 0 }
{ unload file name = ses_strukt.unl number of rows = 0 }
create table "mzdy".ses_strukt 
  (
    c_sestavy integer not null,
    polozka char(80),
    id_pol char(2),
    id_pozice char(2),
    delka integer
  );
revoke all on "mzdy".ses_strukt from "public";

create  index "mzdy".ix_ses_strukt on "mzdy".ses_strukt (c_sestavy);
{ TABLE "mzdy".sko_ind_plan_telo row size = 0 number of columns = 19 index size = 0 }
{ unload file name = sko_ind_plan_telo.unl number of rows = 0 }
create table "mzdy".sko_ind_plan_telo 
  (
    os_cislo decimal(10,0) not null,
    cis_planu integer not null,
    cis_osve char(10) not null,
    termin date,
    dny_trvani integer,
    dny_pozad integer,
    splneno char(1),
    poznamka char(60),
    kod_planu char(10),
    druh_terminu char(1),
    zdroj char(1),
    predpl_naklady decimal(16,2),
    id_fondu integer,
    p_cislo_plan integer,
    kmen_str_plan char(10),
    potlaceno integer,
    kvantita integer,
    upravene_naklady decimal(16,2),
    realizace_vyjimka integer
  );
revoke all on "mzdy".sko_ind_plan_telo from "public";

create unique  index "mzdy".ix_sko_indplan_t1 on "mzdy".sko_ind_plan_telo (os_cislo, cis_planu, cis_osve);
{ TABLE "mzdy".sko_mistnosti row size = 0 number of columns = 2 index size = 0 }
{ unload file name = sko_mistnosti.unl number of rows = 0 }
create table "mzdy".sko_mistnosti 
  (
    id_mistnosti integer not null,
    nazev_mistnosti char(30) not null
  );
revoke all on "mzdy".sko_mistnosti from "public";

{ TABLE "mzdy".sko_nadraz_osve row size = 0 number of columns = 3 index size = 0 }
{ unload file name = sko_nadraz_osve.unl number of rows = 0 }
create table "mzdy".sko_nadraz_osve 
  (
    cislo_osve char(10),
    nadraz_osve char(10),
    doba_nahrazeni integer
  );
revoke all on "mzdy".sko_nadraz_osve from "public";

create unique  index "mzdy".ix_sko_nadraz_osv on "mzdy".sko_nadraz_osve (cislo_osve, nadraz_osve);
{ TABLE "mzdy".sko_ind_plan row size = 0 number of columns = 18 index size = 0 }
{ unload file name = sko_ind_plan.unl number of rows = 0 }
create table "mzdy".sko_ind_plan 
  (
    os_cislo decimal(10,0) not null,
    cis_planu integer not null,
    obdobi_od date,
    obdobi_do date,
    dat_vzniku date,
    splneno_1 char(1),
    aktualizovat_1 char(1),
    termin_1 date,
    datum_1 date,
    splneno_2 char(1),
    aktualizovat_2 char(1),
    termin_2 date,
    datum_2 date,
    splneno_3 char(1),
    datum_3 date,
    pocet_dnu decimal(5,1),
    poznamka char(80),
    kod_planu char(10)
  );
revoke all on "mzdy".sko_ind_plan from "public";

{ TABLE "mzdy".sko_vyuzivani row size = 0 number of columns = 7 index size = 0 }
{ unload file name = sko_vyuzivani.unl number of rows = 0 }
create table "mzdy".sko_vyuzivani 
  (
    id integer not null,
    id_mistnosti integer not null,
    den date,
    hodina_od decimal(4,2),
    hodina_do decimal(4,2),
    p_cislo integer,
    poznamka char(50)
  );
revoke all on "mzdy".sko_vyuzivani from "public";

create unique  index "mzdy".ix_sko_vyuz on "mzdy".sko_vyuzivani (id_mistnosti, den, hodina_od);
{ TABLE "mzdy".sku_proh row size = 0 number of columns = 2 index size = 0 }
{ unload file name = sku_proh.unl number of rows = 2 }
create table "mzdy".sku_proh 
  (
    cislo integer,
    nazev char(30)
  );
revoke all on "mzdy".sku_proh from "public";

{ TABLE "mzdy".skup_oboru row size = 0 number of columns = 2 index size = 0 }
{ unload file name = skup_oboru.unl number of rows = 47 }
create table "mzdy".skup_oboru 
  (
    cislo integer not null,
    skupina char(60) not null
  );
revoke all on "mzdy".skup_oboru from "public";

create unique  index "mzdy".skpo1 on "mzdy".skup_oboru (cislo);
create  index "mzdy".skpo2 on "mzdy".skup_oboru (skupina);
{ TABLE "mzdy".skup_stred row size = 0 number of columns = 3 index size = 0 }
{ unload file name = skup_stred.unl number of rows = 0 }
create table "mzdy".skup_stred 
  (
    skup_str integer not null,
    skup_nazev char(60) not null,
    ident_prenos char(20)
  );
revoke all on "mzdy".skup_stred from "public";

{ TABLE "mzdy".sko_zadosti row size = 0 number of columns = 15 index size = 0 }
{ unload file name = sko_zadosti.unl number of rows = 0 }
create table "mzdy".sko_zadosti 
  (
    id_zadosti integer not null,
    os_cislo decimal(10,0) not null,
    cis_osve char(10),
    id_wf integer,
    popis_zadosti char(255),
    dodavatel char(100),
    odkaz char(255),
    dat_konani_od date,
    dat_konani_do date,
    misto char(100),
    predp_cena decimal(16,2),
    dat_pozad_vyrizeni date,
    datum_vzniku char(19),
    status_vyhodnoc char(1),
    datum_vyhodnoc char(19)
  );
revoke all on "mzdy".sko_zadosti from "public";

{ TABLE "mzdy".slc_druh_dopr row size = 0 number of columns = 2 index size = 0 }
{ unload file name = slc_druh_dopr.unl number of rows = 1 }
create table "mzdy".slc_druh_dopr 
  (
    kod char(3) not null,
    nazev char(25) not null
  );
revoke all on "mzdy".slc_druh_dopr from "public";

{ TABLE "mzdy".slovnik row size = 0 number of columns = 4 index size = 0 }
{ unload file name = slovnik.unl number of rows = 0 }
create table "mzdy".slovnik 
  (
    vyraz char(200) not null,
    jazyk char(1) not null,
    neprekl integer not null,
    preklad char(200) not null
  );
revoke all on "mzdy".slovnik from "public";

{ TABLE "mzdy".sluz_cesty row size = 0 number of columns = 87 index size = 0 }
{ unload file name = sluz_cesty.unl number of rows = 0 }
create table "mzdy".sluz_cesty 
  (
    ev_cislo integer not null,
    par_ev_cislo integer,
    cislo char(25),
    os_cislo decimal(10,0) not null,
    typ char(1),
    poc_misto char(40),
    dat_od date not null,
    cas_od char(5),
    kon_misto char(40),
    dat_do date,
    cas_do char(5),
    cil char(80),
    ucel char(80),
    spolucestujici char(120),
    spolu1 decimal(10,0),
    spolu2 decimal(10,0),
    spolu3 decimal(10,0),
    spolu4 decimal(10,0),
    spolu5 decimal(10,0),
    spolu6 decimal(10,0),
    spolu7 decimal(10,0),
    spolu8 decimal(10,0),
    spolu9 decimal(10,0),
    spolu10 decimal(10,0),
    druh_dopr char(30),
    spz char(9),
    sazba_zn decimal(16,3),
    pohonna_hmota char(15),
    cena_1l_ph decimal(5,3),
    cena1lphz decimal(7,3),
    cena1lphz_m char(3),
    prum_spotreba decimal(5,2),
    spotreba_mesto decimal(5,2),
    spotreba_mimo decimal(5,2),
    cislo_poj char(15),
    vyuct_dne date,
    vyuct_obdobi date,
    vyuct_provedl char(64),
    vyuct_prov_osc decimal(10,0),
    dny integer,
    poc_dnu_diet integer,
    diety_nakl decimal(16,2),
    zp_vypl char(1),
    nakl_str char(10),
    naklady decimal(16,2),
    zdroj char(1),
    vytvor_dne date,
    vytvoril char(64),
    souhl_dne date,
    povolil_osc decimal(10,0),
    povolil_dne date,
    zadovyuct_dne date,
    prub_schval_osc decimal(10,0),
    prub_schval_dne date,
    vdj_schval_osc decimal(10,0),
    vdj_schval_dne date,
    vyuct_schval_osc decimal(10,0),
    vyuct_schval_dne date,
    vyuct_souhl_dne date,
    cstzmprac char(1),
    zauct integer,
    zauct_dne date,
    zauct_kurz_dne date,
    zauct_prefakt char(1),
    zauct_prefakt_org char(20),
    pzn char(120),
    kapes_proc integer,
    kapes_t_proc integer,
    druh char(7),
    cil_zeme char(45),
    predp_nakl decimal(16,2),
    predp_nakl_mena char(3),
    id_proj integer,
    cislo_pom integer,
    let char(1),
    let_o date,
    let_p date,
    let_oti char(13),
    let_pti char(13),
    ubyt char(1),
    aut_puj char(1),
    mdata char(1),
    vizum char(1),
    ost char(512),
    platne_poj char(1),
    cislo_uc_dokl char(20),
    uc_obdobi date
  );
revoke all on "mzdy".sluz_cesty from "public";

create  index "mzdy".ix_cest_zam on "mzdy".sluz_cesty (os_cislo);
create  index "mzdy".ix_cest_zam2 on "mzdy".sluz_cesty (os_cislo, dat_od, dat_do);
create  index "mzdy".ix_cest_zam3 on "mzdy".sluz_cesty (os_cislo, cislo_pom, vyuct_obdobi);
create  index "mzdy".ix_cest_zam4 on "mzdy".sluz_cesty (cislo);
{ TABLE "mzdy".sluz_cesty_vyuct row size = 0 number of columns = 21 index size = 0 }
{ unload file name = sluz_cesty_vyuct.unl number of rows = 0 }
create table "mzdy".sluz_cesty_vyuct 
  (
    ev_cislo integer not null,
    radek integer not null,
    mena_z char(3),
    zal_castka decimal(16,2),
    zal_vraceno decimal(16,2),
    nahrady decimal(16,2),
    nahrady_zvys decimal(16,2),
    nahrady_zvys_prep decimal(16,5),
    rozdil decimal(16,2),
    rozdil_prepoc decimal(16,5),
    mena_na char(3),
    kurz_typ char(1),
    kurz_dne date,
    kurz1 char(25),
    kurz2 char(25),
    vyuct_castka decimal(16,2),
    vyuct_zvys decimal(16,2),
    zp_vypl char(1),
    hp_davka integer,
    hp_dne date,
    vyuct_tuz decimal(16,2)
  );
revoke all on "mzdy".sluz_cesty_vyuct from "public";

create  index "mzdy".ix_slc_vyuct on "mzdy".sluz_cesty_vyuct (ev_cislo);
create  index "mzdy".ix_slc_vyuct2 on "mzdy".sluz_cesty_vyuct (ev_cislo, zp_vypl, vyuct_castka);
{ TABLE "mzdy".soc_vyuz row size = 0 number of columns = 11 index size = 0 }
{ unload file name = soc_vyuz.unl number of rows = 0 }
create table "mzdy".soc_vyuz 
  (
    id integer not null,
    os_cislo decimal(10,0),
    cislo_pom integer,
    vyhoda integer,
    popis char(40),
    prijem decimal(16,2),
    vydaj decimal(16,2),
    cis_faktury char(15),
    pid char(15),
    datum date,
    priznak char(4)
  );
revoke all on "mzdy".soc_vyuz from "public";

create  index "mzdy".ix_datum on "mzdy".soc_vyuz (datum);
create  index "mzdy".ix_osc_datum on "mzdy".soc_vyuz (os_cislo, datum);
{ TABLE "mzdy".smen_mzd_pol row size = 0 number of columns = 7 index size = 0 }
{ unload file name = smen_mzd_pol.unl number of rows = 0 }
create table "mzdy".smen_mzd_pol 
  (
    id integer not null,
    id_sady integer not null,
    nazev char(30),
    id_smeny integer not null,
    mzd_pol char(40),
    dat_od date,
    dat_do date
  );
revoke all on "mzdy".smen_mzd_pol from "public";

create  index "mzdy".ix_sm_kody_mp_id on "mzdy".smen_mzd_pol (id_sady, id_smeny);
{ TABLE "mzdy".smen_kody row size = 0 number of columns = 11 index size = 0 }
{ unload file name = smen_kody.unl number of rows = 0 }
create table "mzdy".smen_kody 
  (
    id integer not null,
    smena char(10) not null,
    popis char(30),
    typ char(1) not null,
    zpracovat integer not null,
    hod_min decimal(5,2),
    hod_max decimal(5,2),
    hod_predvypl char(5),
    poradi integer,
    bg_barva integer,
    fg_barva integer
  );
revoke all on "mzdy".smen_kody from "public";

create  index "mzdy".ix_smen_kody_id on "mzdy".smen_kody (smena);
create  index "mzdy".ix_smen_kody_typ on "mzdy".smen_kody (typ);
create  index "mzdy".ix_smen_kody_por on "mzdy".smen_kody (poradi);
{ TABLE "mzdy".smenovnice row size = 0 number of columns = 12 index size = 0 }
{ unload file name = smenovnice.unl number of rows = 0 }
create table "mzdy".smenovnice 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    id_vazby integer not null,
    id_smen_pol integer not null,
    dny decimal(3,1),
    hodiny decimal(5,2),
    castka decimal(16,2),
    den date not null,
    davka integer,
    inf char(1),
    id_poz integer
  );
revoke all on "mzdy".smenovnice from "public";

create  index "mzdy".ix_smenov_osc on "mzdy".smenovnice (os_cislo, cislo_pom, den);
create  index "mzdy".ix_smenov_osc1 on "mzdy".smenovnice (os_cislo, cislo_pom, den, id_poz);
create  index "mzdy".ix_smenov_osc2 on "mzdy".smenovnice (os_cislo, cislo_pom, den, hodiny, id_poz);
create  index "mzdy".ix_smenov_idv on "mzdy".smenovnice (id_vazby);
create  index "mzdy".ix_smenov_idsp on "mzdy".smenovnice (id_smen_pol);
create  index "mzdy".ix_smenov_den on "mzdy".smenovnice (den);
create  index "mzdy".ix_smenov_idpoz on "mzdy".smenovnice (id_poz);
create  index "mzdy".ix_smenov_hod on "mzdy".smenovnice (hodiny);
{ TABLE "mzdy".smen_prenos row size = 0 number of columns = 22 index size = 0 }
{ unload file name = smen_prenos.unl number of rows = 0 }
create table "mzdy".smen_prenos 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    prac_str char(10),
    kod integer not null,
    dat_od date,
    dat_do date,
    dny decimal(3,1),
    hodiny decimal(5,2),
    typ_mzdy integer,
    trida integer,
    mzd_stup integer,
    tarif decimal(16,2),
    os_hodn decimal(16,2),
    typ_premii integer,
    prem_cast decimal(16,2),
    kraceni decimal(16,2),
    typ char(1),
    datum date not null,
    id_porizeni integer,
    id_vazby integer,
    c_dokladu integer,
    zpracovano integer not null
  );
revoke all on "mzdy".smen_prenos from "public";

create  index "mzdy".ix_sm_pr1 on "mzdy".smen_prenos (os_cislo, cislo_pom, datum);
{ TABLE "mzdy".slc_zalohy row size = 0 number of columns = 17 index size = 0 }
{ unload file name = slc_zalohy.unl number of rows = 0 }
create table "mzdy".slc_zalohy 
  (
    id integer not null,
    ev_cislo integer not null,
    druh char(3),
    castka decimal(16,2) not null,
    mena char(3) not null,
    poz_dne date,
    poz_osc decimal(10,0),
    schv_dne date,
    schv_osc decimal(10,0),
    vypl_dne date,
    vypl_osc decimal(10,0),
    vypl_doklad char(20),
    vypl_jak char(1),
    hp_davka integer,
    castka_tuz decimal(16,2),
    cis_bk char(15),
    zauct_dne date
  );
revoke all on "mzdy".slc_zalohy from "public";

{ TABLE "mzdy".slc_zauct row size = 0 number of columns = 32 index size = 0 }
{ unload file name = slc_zauct.unl number of rows = 0 }
create table "mzdy".slc_zauct 
  (
    id_podniku integer not null,
    sc_bv char(1) not null,
    polozka integer not null,
    rok integer not null,
    ucet_obd integer not null,
    datum_dokladu date not null,
    datum_vytvoreni date not null,
    cislo_sl_cesty char(20) not null,
    cislo char(25),
    text_dokladu char(1000),
    os_cislo char(20) not null,
    ucet char(20) not null,
    pucet char(20),
    castka_md decimal(16,2) not null,
    castka_md_mena decimal(16,2) not null,
    castka_dal decimal(16,2) not null,
    castka_dal_mena decimal(16,2) not null,
    menovy_kurz decimal(12,5),
    kod_meny char(3) not null,
    znak_dane char(20),
    mnozstvi char(15),
    nakl_stred char(20),
    zakazka char(20),
    pov char(20),
    projekt char(40),
    poradi_cinnosti char(20),
    poznamka char(1000),
    typ char(5) not null,
    id_zdroj integer not null,
    kod_uc integer not null,
    datum_dph date,
    id_rozp integer
  );
revoke all on "mzdy".slc_zauct from "public";

{ TABLE "mzdy".sko_nespl row size = 0 number of columns = 11 index size = 0 }
{ unload file name = sko_nespl.unl number of rows = 0 }
create table "mzdy".sko_nespl 
  (
    os_cislo decimal(10,0) not null,
    p_cislo integer,
    datum date,
    naklady decimal(16,2),
    lektor integer,
    hodnoceni decimal(4,2),
    duvod char(2),
    naklady_ost decimal(16,2),
    fond char(10),
    certifikat char(20),
    poznamka char(40)
  );
revoke all on "mzdy".sko_nespl from "public";

create unique  index "mzdy".ix_sko_nespl on "mzdy".sko_nespl (os_cislo, p_cislo);
{ TABLE "mzdy".sko_otazky row size = 0 number of columns = 6 index size = 0 }
{ unload file name = sko_otazky.unl number of rows = 0 }
create table "mzdy".sko_otazky 
  (
    cislo char(7) not null,
    vyznam char(120),
    poradi integer,
    pouzivano integer not null,
    zobrazovat integer not null,
    vaha integer
  );
revoke all on "mzdy".sko_otazky from "public";

{ TABLE "mzdy".sko_pozn_doprezenc row size = 0 number of columns = 4 index size = 0 }
{ unload file name = sko_pozn_doprezenc.unl number of rows = 0 }
create table "mzdy".sko_pozn_doprezenc 
  (
    id_zaznamu integer not null,
    poznamka1 char(250),
    poznamka2 char(250),
    poznamka3 char(250)
  );
revoke all on "mzdy".sko_pozn_doprezenc from "public";

{ TABLE "mzdy".sko_sezn row size = 0 number of columns = 20 index size = 0 }
{ unload file name = sko_sezn.unl number of rows = 84 }
create table "mzdy".sko_sezn 
  (
    os_cislo decimal(10,0) not null,
    p_cislo integer,
    cis_osve char(10) not null,
    c_listiny integer,
    datum date not null,
    plati_do date,
    naklady decimal(16,2),
    skoleni char(100),
    lektor integer,
    certifikat char(20),
    poznamka char(40),
    typ char(7),
    naklady_ost decimal(16,2),
    pred_nastup integer,
    archivovano integer,
    sekundarni integer,
    externi_ziskani integer,
    celkem_dnu decimal(5,1),
    suma_hodin decimal(5,2),
    id_ext_vazby integer
  );
revoke all on "mzdy".sko_sezn from "public";

create  index "mzdy".ix_sko_sezn_1 on "mzdy".sko_sezn (os_cislo, cis_osve, datum, plati_do);
{ TABLE "mzdy".sqlarch row size = 0 number of columns = 11 index size = 0 }
{ unload file name = sqlarch.unl number of rows = 23 }
create table "mzdy".sqlarch 
  (
    datum_proved date not null,
    cas_proved char(12),
    obdobi date not null,
    verze char(11),
    zdroj char(10),
    uzivatel char(64),
    kod_chyby integer,
    ovlivneno integer,
    otisk char(32),
    tabulka char(18),
    prikaz char(255)
  );
revoke all on "mzdy".sqlarch from "public";

create  index "mzdy".ix_sqlarch_cas on "mzdy".sqlarch (datum_proved, cas_proved);
{ TABLE "mzdy".srazky row size = 0 number of columns = 5 index size = 0 }
{ unload file name = srazky.unl number of rows = 6503 }
create table "mzdy".srazky 
  (
    os_cislo decimal(10,0) not null,
    kod integer,
    c_dokladu integer,
    castka decimal(16,2),
    datum date
  );
revoke all on "mzdy".srazky from "public";

create  index "mzdy".ix_sra on "mzdy".srazky (os_cislo, datum);
{ TABLE "mzdy".srazky_vyp row size = 0 number of columns = 20 index size = 0 }
{ unload file name = srazky_vyp.unl number of rows = 2728 }
create table "mzdy".srazky_vyp 
  (
    os_cislo decimal(10,0) not null,
    datum date,
    brutto decimal(16,2),
    nemocenska decimal(16,2),
    zp_celk decimal(16,2),
    sum_odm_nezd decimal(16,2),
    dan decimal(16,2),
    zak_poj decimal(16,2),
    neexe decimal(16,2),
    cista_mzda decimal(16,2),
    zmj decimal(16,2),
    poc_vyz_os integer,
    znc_celk decimal(16,2),
    znc_vl decimal(16,2),
    znc_ost decimal(16,2),
    zbyt_cist decimal(16,2),
    zbyt_zaokr_tr decimal(16,2),
    tretina decimal(16,2),
    pouzita_znc decimal(16,2),
    cista_dpp decimal(16,2)
  );
revoke all on "mzdy".srazky_vyp from "public";

create  index "mzdy".ix_srazky_vyp on "mzdy".srazky_vyp (os_cislo, datum);
{ TABLE "mzdy".st_vzdel row size = 0 number of columns = 4 index size = 0 }
{ unload file name = st_vzdel.unl number of rows = 15 }
create table "mzdy".st_vzdel 
  (
    stupen char(3) not null,
    vyznam char(50) not null,
    poradi integer,
    archiv integer
  );
revoke all on "mzdy".st_vzdel from "public";

{ TABLE "mzdy".stanice_info row size = 0 number of columns = 11 index size = 0 }
{ unload file name = stanice_info.unl number of rows = 0 }
create table "mzdy".stanice_info 
  (
    stanice char(32) not null,
    soubor char(128) not null,
    adresar char(254) not null,
    nazev char(128),
    verze1 char(128),
    verze2 char(128),
    firma char(128),
    prava char(128),
    znacka char(128),
    priv char(32),
    spec char(32)
  );
revoke all on "mzdy".stanice_info from "public";

{ TABLE "mzdy".static_filter row size = 0 number of columns = 3 index size = 0 }
{ unload file name = static_filter.unl number of rows = 1019 }
create table "mzdy".static_filter 
  (
    uzivatel char(64),
    os_cislo decimal(10,0) not null,
    cas_zapisu char(20)
  );
revoke all on "mzdy".static_filter from "public";

create unique  index "mzdy".ix_staticfilter1 on "mzdy".static_filter (uzivatel, os_cislo);
{ TABLE "mzdy".statistiky_pouziti row size = 0 number of columns = 3 index size = 0 }
{ unload file name = statistiky_pouziti.unl number of rows = 2058 }
create table "mzdy".statistiky_pouziti 
  (
    obdobi date not null,
    polozka char(128) not null,
    hodnota char(128) not null
  );
revoke all on "mzdy".statistiky_pouziti from "public";

{ TABLE "mzdy".sql_filter row size = 0 number of columns = 3 index size = 0 }
{ unload file name = sql_filter.unl number of rows = 0 }
create table "mzdy".sql_filter 
  (
    tmpcol1 decimal(10,0),
    tmpcol2 decimal(10,0),
    tmpcol3 integer
  );
revoke all on "mzdy".sql_filter from "public";

{ TABLE "mzdy".stred_zal row size = 0 number of columns = 22 index size = 0 }
{ unload file name = stred_zal.unl number of rows = 2778 }
create table "mzdy".stred_zal 
  (
    str char(10) not null,
    nazev char(80) not null,
    nazev2 char(80),
    cis_divize integer,
    skup_str integer,
    celk_castka decimal(16,2),
    cerp_castka decimal(16,2),
    plan_brut decimal(16,2),
    brutto decimal(16,2),
    pobocka integer,
    priznaky char(10),
    typ char(1),
    plati_od date,
    plati_do date,
    cena_nizsi decimal(16,2),
    cena_vyssi decimal(16,2),
    id_str integer,
    id_podniku integer not null,
    id_projektu integer,
    id_zakazky integer,
    generovat_rezii integer,
    datum date not null
  );
revoke all on "mzdy".stred_zal from "public";

{ TABLE "mzdy".studenti row size = 0 number of columns = 5 index size = 0 }
{ unload file name = studenti.unl number of rows = 4 }
create table "mzdy".studenti 
  (
    os_cislo decimal(10,0) not null,
    skola char(40),
    dat_od date,
    dat_do date,
    doktorand char(1)
  );
revoke all on "mzdy".studenti from "public";

create  index "mzdy".ix_studenti on "mzdy".studenti (os_cislo);
{ TABLE "mzdy".studium row size = 0 number of columns = 7 index size = 0 }
{ unload file name = studium.unl number of rows = 0 }
create table "mzdy".studium 
  (
    os_cislo decimal(10,0) not null,
    stupen char(3),
    obor char(8),
    dat_zahaj date,
    dat_ukonc date,
    skola char(50),
    zamereni char(50)
  );
revoke all on "mzdy".studium from "public";

create  index "mzdy".ix_studium on "mzdy".studium (os_cislo);
{ TABLE "mzdy".sys_schemata row size = 0 number of columns = 8 index size = 0 }
{ unload file name = sys_schemata.unl number of rows = 0 }
create table "mzdy".sys_schemata 
  (
    id integer not null,
    nazev char(50) not null,
    prava integer not null,
    pm_vsechny integer not null,
    datum_od date,
    datum_do date,
    uzivatel char(64) not null,
    datum_cas char(17) not null
  );
revoke all on "mzdy".sys_schemata from "public";

{ TABLE "mzdy".strediska_zakazky row size = 0 number of columns = 2 index size = 0 }
{ unload file name = strediska_zakazky.unl number of rows = 0 }
create table "mzdy".strediska_zakazky 
  (
    stred char(10) not null,
    id_zakazky integer not null
  );
revoke all on "mzdy".strediska_zakazky from "public";

{ TABLE "mzdy".stred row size = 0 number of columns = 21 index size = 0 }
{ unload file name = stred.unl number of rows = 34 }
create table "mzdy".stred 
  (
    str char(10) not null,
    nazev char(80) not null,
    nazev2 char(80),
    cis_divize integer,
    skup_str integer,
    celk_castka decimal(16,2),
    cerp_castka decimal(16,2),
    plan_brut decimal(16,2),
    brutto decimal(16,2),
    pobocka integer,
    priznaky char(10),
    typ char(1),
    plati_od date,
    plati_do date,
    cena_nizsi decimal(16,2),
    cena_vyssi decimal(16,2),
    id_str integer,
    id_podniku integer not null,
    id_projektu integer,
    id_zakazky integer,
    generovat_rezii integer
  );
revoke all on "mzdy".stred from "public";

create unique  index "mzdy".ix_str_idpstr on "mzdy".stred (id_podniku, str);
create  index "mzdy".ix_stred_1 on "mzdy".stred (skup_str, id_podniku);
{ TABLE "mzdy".systemizace row size = 0 number of columns = 8 index size = 0 }
{ unload file name = systemizace.unl number of rows = 281 }
create table "mzdy".systemizace 
  (
    id_stromu integer not null,
    id_pracmist integer not null,
    id_nadrizeny integer,
    datum_od date,
    datum_do date,
    typ_polozky integer,
    poradi integer,
    id_systemizace integer
  );
revoke all on "mzdy".systemizace from "public";

create unique  index "mzdy".ix_systemizace_1 on "mzdy".systemizace (id_stromu, id_pracmist, typ_polozky, datum_od, datum_do);
create  index "mzdy".ix_systemizace_2 on "mzdy".systemizace (id_systemizace, id_pracmist, typ_polozky, datum_od, datum_do);
create  index "mzdy".ix_systemizace_3 on "mzdy".systemizace (id_systemizace, id_nadrizeny, typ_polozky, datum_od, datum_do);
create  index "mzdy".ix_systemizace_4 on "mzdy".systemizace (id_stromu, id_nadrizeny, id_pracmist, typ_polozky);
{ TABLE "mzdy".tabulky row size = 0 number of columns = 11 index size = 0 }
{ unload file name = tabulky.unl number of rows = 1071 }
create table "mzdy".tabulky 
  (
    nazev char(32) not null,
    sum_je integer not null,
    sum_mabyt integer not null,
    upravovano integer not null,
    sdileni_db char(1) not null,
    varianta_sdileni char(32),
    col_os_cislo char(32),
    col_cislo_pom char(32),
    verze char(11),
    verze_zmena char(11),
    popis char(255)
  );
revoke all on "mzdy".tabulky from "public";

{ TABLE "mzdy".tarify row size = 0 number of columns = 11 index size = 0 }
{ unload file name = tarify.unl number of rows = 1549 }
create table "mzdy".tarify 
  (
    typ_mzdy integer,
    trida integer,
    mzd_stup integer,
    odp_roky integer,
    zakl_tarif decimal(16,2),
    max_tarif decimal(16,2),
    mnep_tarif decimal(16,2),
    prem_tarif decimal(16,2),
    poznamka char(20),
    typ_tt integer not null,
    castka_premii decimal(16,2)
  );
revoke all on "mzdy".tarify from "public";

create unique  index "mzdy".ix_tarify on "mzdy".tarify (typ_tt, typ_mzdy, trida, mzd_stup);
{ TABLE "mzdy".tarify_budouci row size = 0 number of columns = 4 index size = 0 }
{ unload file name = tarify_budouci.unl number of rows = 0 }
create table "mzdy".tarify_budouci 
  (
    typ_mzdy integer not null,
    trida integer not null,
    mzd_stup integer,
    tarif decimal(16,2)
  );
revoke all on "mzdy".tarify_budouci from "public";

{ TABLE "mzdy".tel_pom row size = 0 number of columns = 26 index size = 0 }
{ unload file name = tel_pom.unl number of rows = 0 }
create table "mzdy".tel_pom 
  (
    os_cislo decimal(10,0),
    druh_duchodu char(3),
    druh_slevy integer,
    odpoc_deti integer,
    mzd_stup integer,
    trida integer,
    tarif decimal(16,2),
    prum_nem decimal(16,2),
    prum_dov decimal(16,2),
    zaloha decimal(16,2),
    nemocenska decimal(16,2),
    sum_odm_nezd decimal(16,2),
    brutto decimal(16,2),
    dan_zakl decimal(16,2),
    soc_zakl decimal(16,2),
    zdrav_zakl decimal(16,2),
    zdrav_zakln decimal(16,2),
    sum_zak_poj decimal(16,2),
    zakl_sraz_dan decimal(16,2),
    sum_ost_poj decimal(16,2),
    srazk_dan decimal(16,2),
    sum_sleva decimal(16,2),
    tab_dan decimal(16,2),
    sum_dan decimal(16,2),
    sum_srazky decimal(16,2),
    k_vyplate decimal(16,2)
  );
revoke all on "mzdy".tel_pom from "public";

create  index "mzdy".ix_tel_pom on "mzdy".tel_pom (os_cislo);
{ TABLE "mzdy".system_stromy row size = 0 number of columns = 7 index size = 0 }
{ unload file name = system_stromy.unl number of rows = 3 }
create table "mzdy".system_stromy 
  (
    id_stromu integer not null,
    naz_stromu char(60) not null,
    id_systemizace integer,
    zakladni integer not null,
    org_jednotka char(10),
    vychozi char(1),
    id_podniku integer
  );
revoke all on "mzdy".system_stromy from "public";

{ TABLE "mzdy".systemiz_podnik row size = 0 number of columns = 7 index size = 0 }
{ unload file name = systemiz_podnik.unl number of rows = 3 }
create table "mzdy".systemiz_podnik 
  (
    id_systemizace integer not null,
    popis char(50),
    datum_od date,
    datum_do date,
    navrh integer not null,
    zvl_pravo integer,
    portal integer not null
  );
revoke all on "mzdy".systemiz_podnik from "public";

{ TABLE "mzdy".spol_prevody row size = 0 number of columns = 22 index size = 0 }
{ unload file name = spol_prevody.unl number of rows = 28 }
create table "mzdy".spol_prevody 
  (
    id integer not null,
    vyber_kod char(60),
    vyber_zpoj char(20),
    vyber_ustav char(4),
    vyber_podm char(20),
    cislo_banky char(4),
    cislo_uctu char(20),
    nazev_spol_pr char(20) not null,
    var_symb char(10),
    konst_symb char(4),
    spec_symb char(10),
    swift char(11),
    iban char(28),
    upr_castky integer,
    bank_spoj_odkud integer not null,
    c_dokladu integer not null,
    vyber_pobocka char(20),
    uctovani char(20),
    id_bank_spoj_kam integer not null,
    dat_od date not null,
    dat_do date,
    id_podniku integer not null
  );
revoke all on "mzdy".spol_prevody from "public";

create unique  index "mzdy".ix251_11 on "mzdy".spol_prevody (id);
create  index "mzdy".ix251_10 on "mzdy".spol_prevody (c_dokladu, dat_od);
{ TABLE "mzdy".spol_prev_mes row size = 0 number of columns = 3 index size = 0 }
{ unload file name = spol_prev_mes.unl number of rows = 0 }
create table "mzdy".spol_prev_mes 
  (
    c_dokladu integer not null,
    castka decimal(16,2) not null,
    datum date not null
  );
revoke all on "mzdy".spol_prev_mes from "public";

{ TABLE "mzdy".timer_sez row size = 0 number of columns = 4 index size = 0 }
{ unload file name = timer_sez.unl number of rows = 16 }
create table "mzdy".timer_sez 
  (
    id integer not null,
    tabulka char(18) not null,
    polozka char(18) not null,
    archiv char(1) not null
  );
revoke all on "mzdy".timer_sez from "public";

create unique  index "mzdy".ix_timersez on "mzdy".timer_sez (tabulka, polozka);
{ TABLE "mzdy".tituly row size = 0 number of columns = 3 index size = 0 }
{ unload file name = tituly.unl number of rows = 0 }
create table "mzdy".tituly 
  (
    id char(7),
    os_cislo decimal(10,0),
    kde char(1)
  );
revoke all on "mzdy".tituly from "public";

create  index "mzdy".idx_tituly on "mzdy".tituly (os_cislo, kde, id);
{ TABLE "mzdy".tyd_rozvrhy row size = 0 number of columns = 17 index size = 0 }
{ unload file name = tyd_rozvrhy.unl number of rows = 0 }
create table "mzdy".tyd_rozvrhy 
  (
    cis_roz integer not null,
    naz_roz char(20) not null,
    po_hod decimal(4,2) not null,
    ut_hod decimal(4,2) not null,
    st_hod decimal(4,2) not null,
    ct_hod decimal(4,2) not null,
    pa_hod decimal(4,2) not null,
    so_hod decimal(4,2) not null,
    ne_hod decimal(4,2) not null,
    po_zac char(4),
    ut_zac char(4),
    st_zac char(4),
    ct_zac char(4),
    pa_zac char(4),
    so_zac char(4),
    ne_zac char(4),
    dopocet char(1)
  );
revoke all on "mzdy".tyd_rozvrhy from "public";

{ TABLE "mzdy".typy_tt row size = 0 number of columns = 2 index size = 0 }
{ unload file name = typy_tt.unl number of rows = 0 }
create table "mzdy".typy_tt 
  (
    typ_tt integer not null,
    popis_typu char(40)
  );
revoke all on "mzdy".typy_tt from "public";

{ TABLE "mzdy".u_archiv row size = 0 number of columns = 9 index size = 0 }
{ unload file name = u_archiv.unl number of rows = 0 }
create table "mzdy".u_archiv 
  (
    os_cislo decimal(10,0) not null,
    cis_prij_riz integer,
    uzivatel char(64) not null,
    tabulka char(18) not null,
    vyznam char(18) not null,
    stare char(250),
    nove char(250),
    datum date not null,
    cas char(8)
  );
revoke all on "mzdy".u_archiv from "public";

create  index "mzdy".ix_u_archiv on "mzdy".u_archiv (os_cislo);
{ TABLE "mzdy".u_bud_zar row size = 0 number of columns = 10 index size = 0 }
{ unload file name = u_bud_zar.unl number of rows = 0 }
create table "mzdy".u_bud_zar 
  (
    os_cislo decimal(10,0) not null,
    druh_pom char(1),
    prac_kateg integer,
    id_pracmist integer,
    uvazek decimal(4,2),
    profese char(5),
    prac_str char(10),
    plat decimal(16,2),
    obor char(8),
    lok_prac char(7)
  );
revoke all on "mzdy".u_bud_zar from "public";

create  index "mzdy".ix_u_bud_zar on "mzdy".u_bud_zar (os_cislo);
{ TABLE "mzdy".u_dok_prijate row size = 0 number of columns = 13 index size = 0 }
{ unload file name = u_dok_prijate.unl number of rows = 0 }
create table "mzdy".u_dok_prijate 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    typ_dokumentu char(7) not null,
    datum_prijeti date,
    prijal char(32),
    datum_vystaveni date,
    vystavil char(50),
    cesta_soubor char(200),
    nazev_soubor char(50),
    poznamka char(50),
    stav char(7),
    sdilene_uloziste char(150),
    id_blob integer
  );
revoke all on "mzdy".u_dok_prijate from "public";

{ TABLE "mzdy".u_funkce row size = 0 number of columns = 5 index size = 0 }
{ unload file name = u_funkce.unl number of rows = 0 }
create table "mzdy".u_funkce 
  (
    os_cislo decimal(10,0) not null,
    funkce char(8),
    nazev char(50),
    hodiny decimal(4,2),
    plat integer
  );
revoke all on "mzdy".u_funkce from "public";

create  index "mzdy".ix_u_funkce on "mzdy".u_funkce (os_cislo);
{ TABLE "mzdy".u_interview row size = 0 number of columns = 6 index size = 0 }
{ unload file name = u_interview.unl number of rows = 0 }
create table "mzdy".u_interview 
  (
    os_cislo decimal(10,0) not null,
    hodnotitel decimal(10,0) not null,
    vysledek decimal(3,2),
    komentar char(150),
    datum date not null,
    id_pracmist integer
  );
revoke all on "mzdy".u_interview from "public";

create  index "mzdy".ix_interview on "mzdy".u_interview (os_cislo);
{ TABLE "mzdy".u_invalide row size = 0 number of columns = 4 index size = 0 }
{ unload file name = u_invalide.unl number of rows = 0 }
create table "mzdy".u_invalide 
  (
    os_cislo decimal(10,0) not null,
    stupen char(2),
    dat_od date,
    dat_do date
  );
revoke all on "mzdy".u_invalide from "public";

create  index "mzdy".ix_u_invalide on "mzdy".u_invalide (os_cislo);
{ TABLE "mzdy".u_jaz_znal row size = 0 number of columns = 5 index size = 0 }
{ unload file name = u_jaz_znal.unl number of rows = 0 }
create table "mzdy".u_jaz_znal 
  (
    os_cislo decimal(10,0) not null,
    jazyk char(10) not null,
    stupen char(2),
    druh_zkousky char(20),
    datum date
  );
revoke all on "mzdy".u_jaz_znal from "public";

create  index "mzdy".ix_u_jaz_znal on "mzdy".u_jaz_znal (os_cislo);
{ TABLE "mzdy".u_praktic_zkus row size = 0 number of columns = 8 index size = 0 }
{ unload file name = u_praktic_zkus.unl number of rows = 0 }
create table "mzdy".u_praktic_zkus 
  (
    os_cislo decimal(10,0) not null,
    zkusenost char(15) not null,
    pocet_let decimal(3,1),
    ziskano_kde char(40),
    ziskano_od date,
    ziskano_do date,
    id_pracmist integer,
    prepinac integer
  );
revoke all on "mzdy".u_praktic_zkus from "public";

create  index "mzdy".ix_u_pr_zkus on "mzdy".u_praktic_zkus (os_cislo, zkusenost);
{ TABLE "mzdy".u_prij_riz row size = 0 number of columns = 13 index size = 0 }
{ unload file name = u_prij_riz.unl number of rows = 0 }
create table "mzdy".u_prij_riz 
  (
    ev_cislo decimal(10,0) not null,
    poradi integer not null,
    datum_zah date,
    datum_ukonc date,
    druh_pom char(4),
    konkurz integer not null,
    faze integer,
    dat_kontaktu date,
    dat_prij_dot date,
    vysledek char(1),
    poznamka byte,
    dat_archivace date,
    typ_tt integer
  );
revoke all on "mzdy".u_prij_riz from "public";

create  index "mzdy".ix_u_priri on "mzdy".u_prij_riz (ev_cislo);
create  index "mzdy".ix_u_priri2 on "mzdy".u_prij_riz (ev_cislo, vysledek, faze);
{ TABLE "mzdy".u_prac_povol row size = 0 number of columns = 8 index size = 0 }
{ unload file name = u_prac_povol.unl number of rows = 0 }
create table "mzdy".u_prac_povol 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    pr_pov char(1),
    pr_pov_od date,
    pr_pov_do date,
    dat_pobytu_do date,
    cdokl_povol_pobyt char(15),
    vydal_povol_pobyt char(100)
  );
revoke all on "mzdy".u_prac_povol from "public";

create unique  index "mzdy".idx_u_pr_pov on "mzdy".u_prac_povol (id);
{ TABLE "mzdy".u_rod_prisl row size = 0 number of columns = 14 index size = 0 }
{ unload file name = u_rod_prisl.unl number of rows = 0 }
create table "mzdy".u_rod_prisl 
  (
    os_cislo decimal(10,0) not null,
    prijmeni char(40) not null,
    jmeno char(40) not null,
    rodne_cislo char(10),
    datum_narozeni date,
    ulice_trv char(30),
    misto_trv char(48),
    psc_trv char(5),
    vztah char(10),
    narodnost char(2),
    dat_snatku date,
    rodne_jmeno char(40),
    misto_narozeni char(48),
    st_prisl char(3)
  );
revoke all on "mzdy".u_rod_prisl from "public";

create  index "mzdy".ix_u_rodpr on "mzdy".u_rod_prisl (os_cislo);
{ TABLE "mzdy".u_sko_sezn row size = 0 number of columns = 12 index size = 0 }
{ unload file name = u_sko_sezn.unl number of rows = 0 }
create table "mzdy".u_sko_sezn 
  (
    os_cislo decimal(10,0) not null,
    p_cislo integer,
    cis_osve char(10) not null,
    c_listiny integer,
    datum date,
    plati_do date,
    naklady decimal(16,2),
    skoleni char(100),
    lektor integer,
    certifikat char(20),
    poznamka char(20),
    typ char(7)
  );
revoke all on "mzdy".u_sko_sezn from "public";

create  index "mzdy".idx_u_sko_sezn on "mzdy".u_sko_sezn (os_cislo, cis_osve);
create  index "mzdy".u_ix_sko_szn2 on "mzdy".u_sko_sezn (naklady);
create  index "mzdy".u_ix_sko_szn3 on "mzdy".u_sko_sezn (p_cislo);
create  index "mzdy".u_ix_sko_szn4 on "mzdy".u_sko_sezn (c_listiny);
{ TABLE "mzdy".u_sleduj row size = 0 number of columns = 18 index size = 0 }
{ unload file name = u_sleduj.unl number of rows = 0 }
create table "mzdy".u_sleduj 
  (
    os_cislo decimal(10,0) not null,
    zdroj char(20),
    akce char(60),
    prescas char(1),
    smeny char(1),
    dojizdeni char(1),
    km integer,
    ridicb char(1),
    ridic char(15),
    infor char(210),
    nazev char(50),
    funkce char(8),
    dat_od date,
    evid_do date,
    dat_zapis date,
    vek integer,
    stavzam char(7),
    doprovodny_text char(250)
  );
revoke all on "mzdy".u_sleduj from "public";

create  index "mzdy".ix_u_sleduj on "mzdy".u_sleduj (os_cislo);
{ TABLE "mzdy".u_sluz_pom row size = 0 number of columns = 41 index size = 0 }
{ unload file name = u_sluz_pom.unl number of rows = 0 }
create table "mzdy".u_sluz_pom 
  (
    os_cislo decimal(10,0),
    cislo_pom integer,
    hodnost char(20),
    cinnost char(1),
    druh_cinn char(20),
    dat_cinn date,
    pover_funk char(10),
    pf_od date,
    pf_do date,
    prop_hodn char(20),
    ph_od date,
    ph_do date,
    doh_zv_kval char(1),
    doh_hm_zodp char(1),
    dat_nast_mv date,
    dat_nast_ur date,
    kryci_jm char(20),
    dat_sl_hod date,
    duv_sl_hod char(20),
    akt_rozh char(20),
    zvys_ps_rok integer,
    zvys_ps_mes integer,
    dat_jmen_hodn date,
    odchodne integer,
    odch_zap1 integer,
    odch_zap2 integer,
    odch_dor_rozh date,
    zkd_dat_zah date,
    zkd_delka integer,
    zkd_zkr integer,
    lustr_osv char(30),
    pov_cis_rozh char(20),
    pov_id_pracmist integer,
    pov_trida integer,
    pov_mzd_stup integer,
    zap_praxe char(6),
    pov_zap_praxe char(6),
    pracmist_od date,
    pracmist_do date,
    pov_zvys_ps_rok integer,
    pov_zvys_ps_mes integer
  );
revoke all on "mzdy".u_sluz_pom from "public";

create  index "mzdy".ix_usluz_pom on "mzdy".u_sluz_pom (os_cislo, cislo_pom);
{ TABLE "mzdy".u_stipendia row size = 0 number of columns = 7 index size = 0 }
{ unload file name = u_stipendia.unl number of rows = 0 }
create table "mzdy".u_stipendia 
  (
    os_cislo decimal(10,0) not null,
    skola char(50) not null,
    castka decimal(16,2) not null,
    perioda char(1) not null,
    dat_od date not null,
    dat_do date,
    c_dokladu integer not null
  );
revoke all on "mzdy".u_stipendia from "public";

create  index "mzdy".ix_u_st on "mzdy".u_stipendia (os_cislo);
create  index "mzdy".ix_u_st2 on "mzdy".u_stipendia (os_cislo, dat_od);
{ TABLE "mzdy".u_telefony row size = 0 number of columns = 3 index size = 0 }
{ unload file name = u_telefony.unl number of rows = 0 }
create table "mzdy".u_telefony 
  (
    os_cislo decimal(10,0) not null,
    tel_cislo char(50),
    tel_kam char(40)
  );
revoke all on "mzdy".u_telefony from "public";

create  index "mzdy".ix_u_telef on "mzdy".u_telefony (os_cislo);
{ TABLE "mzdy".u_tituly row size = 0 number of columns = 3 index size = 0 }
{ unload file name = u_tituly.unl number of rows = 0 }
create table "mzdy".u_tituly 
  (
    id char(7),
    os_cislo decimal(10,0),
    kde char(1)
  );
revoke all on "mzdy".u_tituly from "public";

create unique  index "mzdy".ix_tituly on "mzdy".u_tituly (os_cislo, kde, id);
{ TABLE "mzdy".u_vzdelani row size = 0 number of columns = 12 index size = 0 }
{ unload file name = u_vzdelani.unl number of rows = 0 }
create table "mzdy".u_vzdelani 
  (
    os_cislo decimal(10,0) not null,
    stupen char(3) not null,
    obor char(8),
    ved_kval char(1),
    druh_zkousky char(10),
    rok_zahaj integer,
    rok_ukonc integer,
    tit char(15),
    skola char(100),
    zamereni char(50),
    obor_text char(100),
    poznamka char(100)
  );
revoke all on "mzdy".u_vzdelani from "public";

create  index "mzdy".ix_u_vzdelani on "mzdy".u_vzdelani (os_cislo);
{ TABLE "mzdy".u_zdrav_poj row size = 0 number of columns = 4 index size = 0 }
{ unload file name = u_zdrav_poj.unl number of rows = 0 }
create table "mzdy".u_zdrav_poj 
  (
    os_cislo decimal(10,0) not null,
    zdrav_poj integer not null,
    dat_od date not null,
    dat_do date
  );
revoke all on "mzdy".u_zdrav_poj from "public";

create  index "mzdy".ix_u_zdrpoj on "mzdy".u_zdrav_poj (os_cislo);
{ TABLE "mzdy".uc_kateg row size = 0 number of columns = 3 index size = 0 }
{ unload file name = uc_kateg.unl number of rows = 0 }
create table "mzdy".uc_kateg 
  (
    zpusob_uc integer not null,
    prac_kateg integer,
    kod_uc integer not null
  );
revoke all on "mzdy".uc_kateg from "public";

create  index "mzdy".ix_ucktg1 on "mzdy".uc_kateg (kod_uc, zpusob_uc);
create  index "mzdy".ix_ucktg2 on "mzdy".uc_kateg (prac_kateg);
{ TABLE "mzdy".u_prukazy row size = 0 number of columns = 9 index size = 0 }
{ unload file name = u_prukazy.unl number of rows = 0 }
create table "mzdy".u_prukazy 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cis_prukazu char(15),
    naz_prukazu char(70),
    vydal char(40),
    dat_vydani date,
    platnost_do date,
    poznamka char(100),
    skupina char(7)
  );
revoke all on "mzdy".u_prukazy from "public";

{ TABLE "mzdy".u_prubeh_zam row size = 0 number of columns = 10 index size = 0 }
{ unload file name = u_prubeh_zam.unl number of rows = 0 }
create table "mzdy".u_prubeh_zam 
  (
    os_cislo decimal(10,0) not null,
    naz_org char(60),
    zamest char(30),
    datum_nastupu date,
    datum_ukonc date,
    duvod char(6),
    profese char(30),
    vykon char(30),
    podriz integer,
    popis char(60)
  );
revoke all on "mzdy".u_prubeh_zam from "public";

create  index "mzdy".ix_u_prubeh_zam on "mzdy".u_prubeh_zam (os_cislo);
{ TABLE "mzdy".ucto_bonatrans row size = 0 number of columns = 11 index size = 0 }
{ unload file name = ucto_bonatrans.unl number of rows = 0 }
create table "mzdy".ucto_bonatrans 
  (
    subsystem char(9),
    anal_ucet char(8),
    nepouzito char(11),
    obdobi_mesic integer,
    stredisko char(5),
    os_cislo decimal(10,0),
    poznamka char(15),
    md integer,
    dal integer,
    prikaz char(6),
    hodiny integer
  );
revoke all on "mzdy".ucto_bonatrans from "public";

create  index "mzdy".ix_ucto_bonatrans on "mzdy".ucto_bonatrans (obdobi_mesic);
{ TABLE "mzdy".ucto_data row size = 0 number of columns = 9 index size = 0 }
{ unload file name = ucto_data.unl number of rows = 0 }
create table "mzdy".ucto_data 
  (
    datum date not null,
    ucet_md char(10),
    ucet_dal char(10),
    castka decimal(16,2),
    stred char(10),
    projekt char(40),
    poznamka char(100),
    priznak char(1),
    ev_cislo integer
  );
revoke all on "mzdy".ucto_data from "public";

create  index "mzdy".ix_ucto_data on "mzdy".ucto_data (datum);
create  index "mzdy".ix_ucto_data2 on "mzdy".ucto_data (ev_cislo);
{ TABLE "mzdy".ucto2 row size = 0 number of columns = 11 index size = 0 }
{ unload file name = ucto2.unl number of rows = 0 }
create table "mzdy".ucto2 
  (
    dokl_rada char(7),
    c_dokladu integer,
    dat_uc date,
    s_ucet char(3),
    a_ucet char(15),
    typ char(2),
    castka decimal(16,2),
    text char(40),
    stred char(10),
    par1 char(20),
    datum date
  );
revoke all on "mzdy".ucto2 from "public";

create  index "mzdy".ix_ucto2 on "mzdy".ucto2 (datum, c_dokladu);
{ TABLE "mzdy".uchazeci row size = 0 number of columns = 102 index size = 0 }
{ unload file name = uchazeci.unl number of rows = 0 }
create table "mzdy".uchazeci 
  (
    os_cislo decimal(10,0),
    prijmeni char(40) not null,
    jmeno char(40) not null,
    titul char(25),
    rodne_jmeno char(40),
    rodne_cislo char(10),
    pohlavi char(1),
    misto_narozeni char(48),
    stat_nar char(2),
    rodin_stav char(1),
    narodnost char(2),
    st_prisl char(3),
    cislo_op char(12),
    cislo_pasu char(12),
    bran_pov char(2),
    ulice_trv char(45),
    tr_ulice char(30),
    tr_cislo char(14),
    misto_trv char(48),
    psc_trv char(5),
    ulice_prech char(45),
    pr_ulice char(30),
    pr_cislo char(14),
    misto_prech char(48),
    psc_prech char(5),
    kmen_str char(10),
    vypl_str integer,
    zaloha decimal(16,2),
    prech_zal integer,
    druh_slevy integer,
    zmen_prac_sch char(5),
    vyziv_os_nvc integer,
    vyziv_os_exm integer,
    druh_duchodu char(3),
    duchod_od date,
    clen_roh char(1),
    vybor_oh integer,
    datum_nastupu date,
    datum_vystupu date,
    datum_zmeny date,
    evid_od date,
    evid_do date,
    uhrn_mezd_letos decimal(16,2),
    uhrn_dohod decimal(16,2),
    kal_dny_dohod integer,
    uhrn_pojist decimal(16,2),
    dan_sleva char(1),
    sleva_od date,
    student char(1) not null,
    uhrn_dan_zakl decimal(16,2),
    uhrn_dani decimal(16,2),
    dan_zakl_cizi decimal(16,2),
    dan_cizi decimal(16,2),
    uhrn_nem decimal(16,2),
    zakl_sraz_dan decimal(16,2),
    srazk_dan decimal(16,2),
    m_dan_zakl_cizi decimal(16,2),
    m_dan_cizi decimal(16,2),
    m_uhrn_nem decimal(16,2),
    m_zakl_sraz_dan decimal(16,2),
    m_srazk_dan decimal(16,2),
    rocni_zuct char(1),
    m_dan_zakl decimal(16,2),
    m_dan decimal(16,2),
    rocni_odpoc decimal(16,2),
    odpoc_duch decimal(16,2),
    odpoc_manz decimal(16,2),
    odpoc_dary decimal(16,2),
    dan_roc_zakl decimal(16,2),
    zust_minci decimal(16,2),
    dluh decimal(16,2),
    kal_dny integer,
    nahr_dny integer,
    kcs_duchod decimal(16,2),
    vek_duchod integer,
    mes_duchod decimal(16,2),
    odpr_roky_dov integer,
    odpr_dny_dov integer,
    zam_roky integer,
    zam_dny integer,
    zdrav_poj integer,
    zdrav_poj_od date,
    min_zdrav_poj integer,
    cis_poj_cizi char(10),
    deti_pro_duch integer,
    zast_misto char(20),
    zast_ulice char(20),
    zast_psc char(5),
    ev_cislo decimal(10,0),
    sanon char(8),
    faze char(5),
    druh_sluzby char(20),
    telefon2 char(20),
    email char(45),
    titul_za char(25),
    stat_adr char(2),
    id_stat integer,
    duplicita decimal(10,0),
    dat_souhl101 date,
    zdroj char(7),
    id_podniku integer,
    sysstav char(1)
  );
revoke all on "mzdy".uchazeci from "public";

create  index "mzdy".ix_uch_pri on "mzdy".uchazeci (prijmeni);
create unique  index "mzdy".ix_uch_osc on "mzdy".uchazeci (os_cislo);
{ TABLE "mzdy".telef_ag row size = 0 number of columns = 4 index size = 0 }
{ unload file name = telef_ag.unl number of rows = 0 }
create table "mzdy".telef_ag 
  (
    agenda integer not null,
    tel_kam1 char(40) not null,
    tel_kam2 char(40),
    tel_kam3 char(40)
  );
revoke all on "mzdy".telef_ag from "public";

{ TABLE "mzdy".telefony row size = 0 number of columns = 4 index size = 0 }
{ unload file name = telefony.unl number of rows = 975 }
create table "mzdy".telefony 
  (
    os_cislo decimal(10,0) not null,
    tel_cislo char(50) not null,
    tel_kam char(40) not null,
    poznamka char(200)
  );
revoke all on "mzdy".telefony from "public";

create unique  index "mzdy".ix_telef on "mzdy".telefony (os_cislo, tel_kam, tel_cislo);
create  index "mzdy".ix_telef2 on "mzdy".telefony (os_cislo, tel_cislo);
{ TABLE "mzdy".telegram row size = 0 number of columns = 95 index size = 0 }
{ unload file name = telegram.unl number of rows = 30181 }
create table "mzdy".telegram 
  (
    os_cislo decimal(10,0) not null,
    druh_duchodu char(3),
    druh_slevy integer,
    odpoc_deti integer,
    zdrav_poj integer,
    prac_kateg integer,
    mzd_stup integer,
    trida integer,
    tarif decimal(16,2),
    prum_nem decimal(16,2),
    prum_dov decimal(16,2),
    str char(10),
    zaloha decimal(16,2),
    nemocenska decimal(16,2),
    sum_prid decimal(16,2),
    sum_odm_nezd decimal(16,2),
    sum_odm_ost decimal(16,2),
    brutto decimal(16,2),
    dan_zakl decimal(16,2),
    soc_zakl decimal(16,2),
    zdrav_zakl decimal(16,2),
    zdrav_zakln decimal(16,2),
    min_zpoj_zakl decimal(16,2),
    sum_zak_poj decimal(16,2),
    zakl_sraz_dan decimal(16,2),
    sum_ost_poj decimal(16,2),
    srazk_dan decimal(16,2),
    sum_sleva decimal(16,2),
    tab_dan decimal(16,2),
    sum_dan decimal(16,2),
    sum_srazky decimal(16,2),
    zust_minci decimal(16,2),
    k_vyplate decimal(16,2),
    odprac_dny decimal(5,1),
    odprac_hod decimal(7,2),
    neod_hod decimal(7,2),
    prescas_hod decimal(7,2),
    dov_narok decimal(6,2),
    dov_cerpana decimal(6,2),
    dov_kracena decimal(6,2),
    datum date not null,
    tab_dan_pred decimal(16,2),
    uplat_sleva decimal(16,2),
    super_hruba decimal(16,2),
    sp_pod decimal(16,2),
    zp_pod decimal(16,2),
    super_hr_sr decimal(16,2),
    sp_pod_sr decimal(16,2),
    zp_pod_sr decimal(16,2),
    super_hr_sr_bezdpp decimal(16,2),
    sp_pod_sr_bezdpp decimal(16,2),
    zp_pod_sr_bezdpp decimal(16,2),
    super_hr_sr1 decimal(16,2),
    sp_pod_sr1 decimal(16,2),
    zp_pod_sr1 decimal(16,2),
    prisp_zp decimal(16,2),
    prisp_pp decimal(16,2),
    soc_zakl_x decimal(16,2),
    zdrav_zakl_x decimal(16,2),
    zdrav_zakln_x decimal(16,2),
    soc_uhrn_vz decimal(16,2),
    zdrav_uhrn_vz decimal(16,2),
    soc_uhrn_vz_x decimal(16,2),
    zdrav_uhrn_vz_x decimal(16,2),
    nem_nahr decimal(16,2),
    nem_nahr_znm decimal(16,2),
    duch_zakl decimal(16,2),
    prac_str char(10),
    celk_cena_prace decimal(16,2),
    uhrn_soc_poj decimal(16,2),
    uhrn_zdrav_poj decimal(16,2),
    zdan_mzda decimal(16,2),
    sol_dan_zakl decimal(16,2),
    sol_dan decimal(16,2),
    druhy_pilier_sk char(1),
    duch_spor_zakl decimal(16,2),
    e101 char(1),
    soc_zakl_e101 decimal(16,2),
    zdrav_zakl_e101 decimal(16,2),
    smluv_netto decimal(16,2),
    smluv_netto_cizi decimal(16,2),
    netto_koef decimal(8,6),
    kurz_smluv_netto decimal(12,4),
    odpoc_zp char(1),
    zdrav_poj_odpoc decimal(16,2),
    sp_podn_odv decimal(16,2),
    zp_podn_odv decimal(16,2),
    zakl_dan_vyssi decimal(16,2),
    dan_vyssi decimal(16,2),
    min_predd_vyse decimal(16,2),
    min_predd_neupl char(1),
    min_predd_dopl decimal(16,2),
    sleva_sp_fir_stav char(1),
    sleva_sp_fir_druh char(1),
    sleva_sp_duch char(1)
  );
revoke all on "mzdy".telegram from "public";

create unique  index "mzdy".ix_telegr on "mzdy".telegram (os_cislo, datum);
create  index "mzdy".ix_telegr1 on "mzdy".telegram (os_cislo, datum, str);
create  index "mzdy".ix_tel_st on "mzdy".telegram (str, datum);
create  index "mzdy".ix_tel_st1 on "mzdy".telegram (datum, str);
create  index "mzdy".ix_telegr2 on "mzdy".telegram (datum, os_cislo, soc_zakl);
create  index "mzdy".ix_telegr3 on "mzdy".telegram (zdrav_poj, datum, os_cislo);
{ TABLE "mzdy".timer_data row size = 0 number of columns = 13 index size = 0 }
{ unload file name = timer_data.unl number of rows = 64 }
create table "mzdy".timer_data 
  (
    id_budzmeny integer not null,
    id integer not null,
    os_cislo decimal(10,0),
    cislo_pom integer,
    klic char(80),
    hodnota char(50),
    plati_od date not null,
    plati_do date,
    zmena date not null,
    uzivatel char(64) not null,
    pridano char(20),
    provedeno char(1) not null,
    id_zmeny char(1)
  );
revoke all on "mzdy".timer_data from "public";

create  index "mzdy".ix_timerdata_1 on "mzdy".timer_data (id, hodnota, plati_od, plati_do);
create  index "mzdy".ix_timerdata_2 on "mzdy".timer_data (zmena, provedeno, id_zmeny);
create  index "mzdy".ix_timerdata_3 on "mzdy".timer_data (os_cislo, cislo_pom, klic);
{ TABLE "mzdy".ukoly row size = 0 number of columns = 11 index size = 0 }
{ unload file name = ukoly.unl number of rows = 0 }
create table "mzdy".ukoly 
  (
    id integer not null,
    predmet char(50),
    zadal char(32),
    komu char(32),
    datum date,
    termin date,
    stav char(1),
    popis char(255),
    perioda integer,
    cas_jedn char(1),
    dny_pred integer
  );
revoke all on "mzdy".ukoly from "public";

create  index "mzdy".ix_ukoly on "mzdy".ukoly (id, predmet, zadal, komu, datum);
{ TABLE "mzdy".univ_cisel row size = 0 number of columns = 4 index size = 0 }
{ unload file name = univ_cisel.unl number of rows = 71 }
create table "mzdy".univ_cisel 
  (
    id integer not null,
    cislo char(7) not null,
    vyznam char(120),
    archiv char(1)
  );
revoke all on "mzdy".univ_cisel from "public";

create  index "mzdy".ix_un_cis on "mzdy".univ_cisel (id, cislo);
{ TABLE "mzdy".ulohy_na_pozadi row size = 0 number of columns = 10 index size = 0 }
{ unload file name = ulohy_na_pozadi.unl number of rows = 0 }
create table "mzdy".ulohy_na_pozadi 
  (
    id integer not null,
    parametry char(300),
    datum_zapisu date not null,
    cas_zapisu char(6) not null,
    stav integer not null,
    zprava char(500),
    process_id integer,
    vlozil char(30),
    zdroj char(50),
    id_log integer
  );
revoke all on "mzdy".ulohy_na_pozadi from "public";

{ TABLE "mzdy".uziv_format row size = 0 number of columns = 9 index size = 0 }
{ unload file name = uziv_format.unl number of rows = 11 }
create table "mzdy".uziv_format 
  (
    format char(20) not null,
    polozka char(20) not null,
    poradi integer,
    pos_od integer,
    pos_do integer,
    pom_pole char(10),
    zaokr integer,
    des_tecka integer,
    indik integer not null
  );
revoke all on "mzdy".uziv_format from "public";

create unique  index "mzdy".ix_uziv_format on "mzdy".uziv_format (format, indik, polozka);
{ TABLE "mzdy".uzivatele row size = 0 number of columns = 6 index size = 0 }
{ unload file name = uzivatele.unl number of rows = 20 }
create table "mzdy".uzivatele 
  (
    uzivatel char(64) not null,
    heslo char(32),
    exklpristup char(1),
    lastconnect char(19),
    lastdisconnect char(19),
    sestaveni char(16)
  );
revoke all on "mzdy".uzivatele from "public";

create unique  index "mzdy".idx_uzivatele on "mzdy".uzivatele (uzivatel);
{ TABLE "mzdy".vojen_evid row size = 0 number of columns = 14 index size = 0 }
{ unload file name = vojen_evid.unl number of rows = 0 }
create table "mzdy".vojen_evid 
  (
    os_cislo decimal(10,0) not null,
    ovs char(20),
    cvo char(3),
    voj_hodn integer,
    vyd_pr date,
    zdrav_klas char(1),
    zprosten char(1),
    schopen char(1),
    pov_rozkaz char(1),
    ukonc_zvs date,
    cvk char(20),
    duvod_zprosteni char(250),
    datum_zprosteni date,
    poznamka char(250)
  );
revoke all on "mzdy".vojen_evid from "public";

create  index "mzdy".ix_voe on "mzdy".vojen_evid (os_cislo);
{ TABLE "mzdy".vrac_prepl_dane row size = 0 number of columns = 7 index size = 0 }
{ unload file name = vrac_prepl_dane.unl number of rows = 0 }
create table "mzdy".vrac_prepl_dane 
  (
    kod integer not null,
    obdobi date not null,
    castka decimal(16,2) not null,
    zazadano_dne date,
    vraceno_dne date,
    pobocka integer,
    id_podniku integer not null
  );
revoke all on "mzdy".vrac_prepl_dane from "public";

create unique  index "mzdy".ix_vrac_prepl_dane on "mzdy".vrac_prepl_dane (obdobi, kod, pobocka, id_podniku);
{ TABLE "mzdy".vybriz_dok_prijate row size = 0 number of columns = 14 index size = 0 }
{ unload file name = vybriz_dok_prijate.unl number of rows = 0 }
create table "mzdy".vybriz_dok_prijate 
  (
    id integer not null,
    id_vybriz integer not null,
    typ_dokumentu char(7) not null,
    datum_prijeti date,
    prijal char(32),
    datum_vystaveni date,
    vystavil char(50),
    cesta_soubor char(200),
    nazev_soubor char(50),
    poznamka char(50),
    sdilene_uloziste char(150),
    id_blob integer,
    nazev_dokumentu char(80),
    platnost_all integer
  );
revoke all on "mzdy".vybriz_dok_prijate from "public";

{ TABLE "mzdy".uraz_form row size = 0 number of columns = 71 index size = 0 }
{ unload file name = uraz_form.unl number of rows = 1 }
create table "mzdy".uraz_form 
  (
    ident integer not null,
    evid_cis integer not null,
    cislo_urazu char(11) not null,
    os_cislo decimal(10,0) not null,
    stred char(10),
    misto char(50),
    pravid_prac char(1),
    pracoviste_nazev char(70),
    pracoviste_ulice char(50),
    pracoviste_misto char(50),
    pracoviste_psc char(5),
    pracoviste_okec char(100),
    kvalif char(1),
    datum date,
    hodina decimal(4,2),
    poc_hodin decimal(4,2),
    zac_smeny decimal(4,2),
    poc_osob integer,
    druh_uraz char(1),
    datum_smeny date,
    sest_1 char(1),
    sest_2 char(1),
    sest_3 char(1),
    sest_4 char(1),
    sest_5 char(1),
    sest_6 char(1),
    sest_7 char(1),
    sest_8 char(1),
    sest_9 char(1),
    sest_10 char(1),
    sedm_1 char(1),
    sedm_2 char(1),
    sedm_3 char(1),
    sedm_4 char(1),
    sedm_5 char(1),
    sedm_6 char(1),
    sedm_7 char(1),
    cinn integer,
    dr_pr integer,
    dr_zran integer,
    popis integer,
    predpis integer,
    pracoviste_ico char(10),
    pracoviste_cz_nace char(6),
    trvani_dpn_od date,
    trvani_dpn_do date,
    datum_umrti date,
    cast_tela char(80),
    sest_11 char(1),
    navyk_latky char(96),
    navyk_latky_k char(1),
    opatreni integer,
    vyjadreni integer,
    zm_hospit char(1),
    zm_trv_dpn_od date,
    zm_trv_dpn_do date,
    zm_datum_umrti date,
    zm_jine integer,
    datum_vystaveni date,
    svedek1 char(40),
    svedek2 char(40),
    svedek3 char(40),
    zastupce_z char(40),
    zastupce_oo char(40),
    zastupce_org char(40),
    prac_zaraz char(30),
    zm_datum_vyst date,
    zm_zastupce_org char(40),
    zm_prac_zaraz char(30),
    cis_on char(6),
    nepracovni char(1)
  );
revoke all on "mzdy".uraz_form from "public";

create  index "mzdy".ix_urazf on "mzdy".uraz_form (os_cislo);
create  index "mzdy".ix_urazf2 on "mzdy".uraz_form (evid_cis);
{ TABLE "mzdy".uraz_opat row size = 0 number of columns = 10 index size = 0 }
{ unload file name = uraz_opat.unl number of rows = 0 }
create table "mzdy".uraz_opat 
  (
    id integer not null,
    ident integer not null,
    cislo_urazu char(11) not null,
    os_cislo decimal(10,0) not null,
    datum_seznameni date,
    seznamil char(50),
    opatreni char(250),
    zodpovida char(50),
    termin date,
    splneno integer
  );
revoke all on "mzdy".uraz_opat from "public";

create  index "mzdy".ix_urazo on "mzdy".uraz_opat (ident);
{ TABLE "mzdy".vyjimky row size = 0 number of columns = 11 index size = 0 }
{ unload file name = vyjimky.unl number of rows = 0 }
create table "mzdy".vyjimky 
  (
    os_cislo decimal(10,0) not null,
    povolil decimal(10,0) not null,
    datum_od date,
    datum_do date,
    pro_co char(10),
    id_tabul integer not null,
    cis_rozh char(20),
    druh_vyj char(7),
    duvod char(7),
    popis_duvodu char(80),
    cis_planu integer
  );
revoke all on "mzdy".vyjimky from "public";

create unique  index "mzdy".idx_vyjimky on "mzdy".vyjimky (os_cislo, pro_co, id_tabul, datum_od, datum_do);
{ TABLE "mzdy".vyp_rejstr row size = 0 number of columns = 4 index size = 0 }
{ unload file name = vyp_rejstr.unl number of rows = 0 }
create table "mzdy".vyp_rejstr 
  (
    os_cislo decimal(10,0),
    vydal char(40),
    plati_od date,
    plati_do date
  );
revoke all on "mzdy".vyp_rejstr from "public";

{ TABLE "mzdy".vypl_list_pozn row size = 0 number of columns = 5 index size = 0 }
{ unload file name = vypl_list_pozn.unl number of rows = 0 }
create table "mzdy".vypl_list_pozn 
  (
    os_cislo decimal(10,0) not null,
    pozn1 char(70),
    pozn2 char(70),
    castka decimal(16,2),
    obdobi date not null
  );
revoke all on "mzdy".vypl_list_pozn from "public";

create unique  index "mzdy".ix_vl_pozn on "mzdy".vypl_list_pozn (os_cislo, obdobi);
{ TABLE "mzdy".workfl_body row size = 0 number of columns = 47 index size = 0 }
{ unload file name = workfl_body.unl number of rows = 0 }
create table "mzdy".workfl_body 
  (
    id integer not null,
    id_poz integer not null,
    verze integer not null,
    datum_od date,
    datum_do date,
    pul_den char(1),
    doba integer,
    id_vazba integer,
    duvod char(999),
    popis char(999),
    popis2 char(50),
    prijmeni char(40),
    jmeno char(40),
    titul char(25),
    titul_za char(15),
    rodne_jmeno char(40),
    misto_narozeni char(48),
    rodin_stav char(1),
    narodnost char(2),
    st_prisl char(3),
    cislo_op char(12),
    cislo_pasu char(12),
    tr_ulice char(30),
    tr_cislo char(14),
    misto_trv char(48),
    psc_trv char(5),
    posta_trv char(48),
    pr_ulice char(30),
    pr_cislo char(14),
    misto_prech char(48),
    psc_prech char(5),
    posta_prech char(48),
    cislo_platby char(20),
    cislo_banky char(4),
    swift char(8),
    iban char(28),
    b_druh integer,
    b_castka decimal(16,2),
    b_dodavatel char(40),
    b_objednavka char(1),
    tabulka char(20),
    vyridit_do date,
    obdobi date not null,
    obdobi_do date,
    archiv char(1),
    datum date not null,
    zapsal decimal(10,0) not null
  );
revoke all on "mzdy".workfl_body from "public";

create unique  index "mzdy".ix_workfl on "mzdy".workfl_body (id_poz, verze);
create  index "mzdy".ix_workfl2 on "mzdy".workfl_body (id_vazba);
create  index "mzdy".ix_workflb3 on "mzdy".workfl_body (obdobi, obdobi_do);
create  index "mzdy".ix_workflb4 on "mzdy".workfl_body (vyridit_do);
create  index "mzdy".ix_workflb5 on "mzdy".workfl_body (datum_od, datum_do);
create  index "mzdy".ix_workflb6 on "mzdy".workfl_body (id_vazba, tabulka, archiv);
{ TABLE "mzdy".workfl_faze row size = 0 number of columns = 6 index size = 0 }
{ unload file name = workfl_faze.unl number of rows = 0 }
create table "mzdy".workfl_faze 
  (
    id_master integer not null,
    faze integer not null,
    popis char(30),
    id_sablony integer,
    cas char(18) not null,
    zapsal decimal(10,0) not null
  );
revoke all on "mzdy".workfl_faze from "public";

{ TABLE "mzdy".workfl_hl row size = 0 number of columns = 16 index size = 0 }
{ unload file name = workfl_hl.unl number of rows = 0 }
create table "mzdy".workfl_hl 
  (
    id_poz integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    id_diu integer,
    typ char(10) not null,
    agenda char(15) not null,
    id_master integer,
    last_notif char(17),
    id_org_stru integer,
    url_odkaz char(300),
    exter_zprac char(2),
    exter_zpr_kdy char(17),
    druh_pom_j char(2),
    storno integer,
    id_nadriz integer,
    ids char(50)
  );
revoke all on "mzdy".workfl_hl from "public";

create  index "mzdy".ix_whl_os_cislo on "mzdy".workfl_hl (os_cislo);
create  index "mzdy".ix_whl_typ on "mzdy".workfl_hl (typ);
create  index "mzdy".ix_whl_storno on "mzdy".workfl_hl (storno);
create  index "mzdy".ix_whl_nadr on "mzdy".workfl_hl (id_nadriz);
{ TABLE "mzdy".workfl_hodnoty row size = 0 number of columns = 4 index size = 0 }
{ unload file name = workfl_hodnoty.unl number of rows = 0 }
create table "mzdy".workfl_hodnoty 
  (
    id_poz integer not null,
    klic char(25) not null,
    hodnota char(400) not null,
    cas char(17) not null
  );
revoke all on "mzdy".workfl_hodnoty from "public";

create unique  index "mzdy".ix_work1 on "mzdy".workfl_hodnoty (id_poz, klic);
{ TABLE "mzdy".workfl_hzbody row size = 0 number of columns = 14 index size = 0 }
{ unload file name = workfl_hzbody.unl number of rows = 0 }
create table "mzdy".workfl_hzbody 
  (
    id integer not null,
    id_poz integer not null,
    verze integer not null,
    datum_od date,
    datum_do date,
    id_vazba integer,
    duvod char(999),
    popis char(999),
    popis2 char(50),
    vyridit_do date,
    obdobi date not null,
    archiv char(1),
    datum date not null,
    zapsal decimal(10,0) not null
  );
revoke all on "mzdy".workfl_hzbody from "public";

create unique  index "mzdy".ix_wfl_hz on "mzdy".workfl_hzbody (id_poz, verze);
{ TABLE "mzdy".workfl_adresati row size = 0 number of columns = 5 index size = 0 }
{ unload file name = workfl_adresati.unl number of rows = 0 }
create table "mzdy".workfl_adresati 
  (
    id integer not null,
    id_nadriz integer not null,
    id_poz integer not null,
    stav char(16) not null,
    adresat char(40) not null
  );
revoke all on "mzdy".workfl_adresati from "public";

create  index "mzdy".ix_wf_adr on "mzdy".workfl_adresati (adresat, id_nadriz, id_poz);
{ TABLE "mzdy".workfl_absence row size = 0 number of columns = 19 index size = 0 }
{ unload file name = workfl_absence.unl number of rows = 0 }
create table "mzdy".workfl_absence 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    dch_kod integer,
    mzd_kod integer,
    dat_od date not null,
    dat_do date not null,
    cas_od char(15) not null,
    cas_do char(15) not null,
    doba integer,
    dny decimal(3,1),
    hodiny decimal(5,2),
    stav char(16) not null,
    sys_stav char(1) not null,
    popis char(50),
    id_poz integer not null,
    workfl_proc_id integer not null,
    archiv char(1),
    dummy_col char(1)
  );
revoke all on "mzdy".workfl_absence from "public";

create  index "mzdy".ix_wfabs on "mzdy".workfl_absence (os_cislo, cislo_pom, sys_stav, archiv);
create  index "mzdy".ix_wfabs1 on "mzdy".workfl_absence (id_poz, sys_stav, dat_od, archiv);
create  index "mzdy".ix_wfabs2 on "mzdy".workfl_absence (workfl_proc_id);
create  index "mzdy".ix_wfabs3 on "mzdy".workfl_absence (dat_od, dat_do, archiv, sys_stav);
create  index "mzdy".ix_wfabs4 on "mzdy".workfl_absence (id_poz);
{ TABLE "mzdy".webapi_users row size = 0 number of columns = 5 index size = 0 }
{ unload file name = webapi_users.unl number of rows = 0 }
create table "mzdy".webapi_users 
  (
    uzivatel char(64) not null,
    heslo char(250) not null,
    pws char(50) not null,
    konektor char(100) not null,
    ch char(100) not null
  );
revoke all on "mzdy".webapi_users from "public";

{ TABLE "mzdy".workfl_faze_un row size = 0 number of columns = 4 index size = 0 }
{ unload file name = workfl_faze_un.unl number of rows = 0 }
create table "mzdy".workfl_faze_un 
  (
    id_master integer not null,
    faze integer not null,
    ident char(10),
    un char(2000)
  );
revoke all on "mzdy".workfl_faze_un from "public";

{ TABLE "mzdy".webapi_row_permiss row size = 0 number of columns = 2 index size = 0 }
{ unload file name = webapi_row_permiss.unl number of rows = 0 }
create table "mzdy".webapi_row_permiss 
  (
    uzivatel char(64) not null,
    id_permission integer not null
  );
revoke all on "mzdy".webapi_row_permiss from "public";

{ TABLE "mzdy".workfl_ext_call row size = 0 number of columns = 8 index size = 0 }
{ unload file name = workfl_ext_call.unl number of rows = 0 }
create table "mzdy".workfl_ext_call 
  (
    hash_code char(36) not null,
    proc_id integer not null,
    stav char(20) not null,
    stav_text char(50) not null,
    adresat decimal(10,0) not null,
    email_adresata char(50) not null,
    email_uzivatele char(50),
    zpracovano char(1) not null
  );
revoke all on "mzdy".workfl_ext_call from "public";

create  index "mzdy".ix_ext_call1 on "mzdy".workfl_ext_call (hash_code);
create  index "mzdy".ix_ext_call2 on "mzdy".workfl_ext_call (proc_id);
create  index "mzdy".ix_ext_call3 on "mzdy".workfl_ext_call (zpracovano);
{ TABLE "mzdy".webapi_items row size = 0 number of columns = 9 index size = 0 }
{ unload file name = webapi_items.unl number of rows = 1195 }
create table "mzdy".webapi_items 
  (
    id integer not null,
    skupina_udaju char(48) not null,
    polozka char(48) not null,
    db_t char(48) not null,
    db_c char(48) not null,
    db_null char(1) not null,
    typ_prava char(4) not null,
    db_typ char(16) not null,
    pseudo char(1) not null
  );
revoke all on "mzdy".webapi_items from "public";

create unique  index "mzdy".idx_webapi_items on "mzdy".webapi_items (skupina_udaju, polozka);
create unique  index "mzdy".idx_webapi_items1 on "mzdy".webapi_items (db_t, db_c);
{ TABLE "mzdy".webapi_permissions row size = 0 number of columns = 3 index size = 0 }
{ unload file name = webapi_permissions.unl number of rows = 0 }
create table "mzdy".webapi_permissions 
  (
    id_polozky integer not null,
    uzivatel char(64) not null,
    typ_prava char(4) not null
  );
revoke all on "mzdy".webapi_permissions from "public";

{ TABLE "mzdy".vzdelani row size = 0 number of columns = 14 index size = 0 }
{ unload file name = vzdelani.unl number of rows = 570 }
create table "mzdy".vzdelani 
  (
    id_vzdelani integer not null,
    os_cislo decimal(10,0) not null,
    stupen char(3) not null,
    obor char(8),
    ved_kval char(1),
    druh_zkousky char(10),
    rok_ukonc integer,
    tit char(15),
    skola char(100),
    zamereni char(50),
    datum_ziskani date,
    poznamka char(100),
    kodsko char(9),
    kod_oboru_trex char(30)
  );
revoke all on "mzdy".vzdelani from "public";

create  index "mzdy".ix_vzdel on "mzdy".vzdelani (os_cislo, stupen);
{ TABLE "mzdy".vzdelani_aprobace row size = 0 number of columns = 3 index size = 0 }
{ unload file name = vzdelani_aprobace.unl number of rows = 0 }
create table "mzdy".vzdelani_aprobace 
  (
    os_cislo decimal(10,0) not null,
    stupen char(3),
    aprobace char(100)
  );
revoke all on "mzdy".vzdelani_aprobace from "public";

create  index "mzdy".ix_vzdel_aprob on "mzdy".vzdelani_aprobace (os_cislo, stupen);
{ TABLE "mzdy".vyrobak row size = 0 number of columns = 14 index size = 0 }
{ unload file name = vyrobak.unl number of rows = 0 }
create table "mzdy".vyrobak 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    zakazka char(20),
    cinnost char(20),
    stred char(10),
    kod integer,
    dny decimal(3,1),
    hodiny decimal(5,2),
    castka decimal(8,2),
    datum_od date,
    datum_do date,
    davka integer,
    vytvoril char(32),
    obdobi date not null
  );
revoke all on "mzdy".vyrobak from "public";

create  index "mzdy".ix_vyr_os on "mzdy".vyrobak (os_cislo, cislo_pom, obdobi);
{ TABLE "mzdy".workfl_plandovol row size = 0 number of columns = 6 index size = 0 }
{ unload file name = workfl_plandovol.unl number of rows = 0 }
create table "mzdy".workfl_plandovol 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    id_poz integer not null,
    datum date not null,
    prizn char(1) not null,
    hodiny decimal(5,2)
  );
revoke all on "mzdy".workfl_plandovol from "public";

create unique  index "mzdy".ix_pldov on "mzdy".workfl_plandovol (os_cislo, cislo_pom, id_poz, datum);
{ TABLE "mzdy".workfl_master row size = 0 number of columns = 6 index size = 0 }
{ unload file name = workfl_master.unl number of rows = 0 }
create table "mzdy".workfl_master 
  (
    id integer not null,
    typ char(10) not null,
    nazev char(50) not null,
    kod_os char(10),
    cas char(18) not null,
    zapsal decimal(10,0) not null
  );
revoke all on "mzdy".workfl_master from "public";

{ TABLE "mzdy".workfl_stavy row size = 0 number of columns = 18 index size = 0 }
{ unload file name = workfl_stavy.unl number of rows = 0 }
create table "mzdy".workfl_stavy 
  (
    id integer not null,
    id_master integer not null,
    faze integer not null,
    stav char(10) not null,
    sys_stav char(1),
    sys_stav2 char(1),
    sys_stav_as char(1),
    pristup char(10),
    popis char(50) not null,
    zprava char(200),
    validace char(456),
    akce char(800),
    adresat char(175),
    next_faze integer,
    id_email_pozn integer,
    cas char(18) not null,
    zapsal decimal(10,0) not null,
    oznam char(210)
  );
revoke all on "mzdy".workfl_stavy from "public";

create unique  index "mzdy".ix_wf_stavy on "mzdy".workfl_stavy (id_master, faze, stav);
{ TABLE "mzdy".workfl_zazn row size = 0 number of columns = 23 index size = 0 }
{ unload file name = workfl_zazn.unl number of rows = 0 }
create table "mzdy".workfl_zazn 
  (
    id integer not null,
    id_poz integer not null,
    klic char(15) not null,
    datum1 date,
    datum2 date,
    datum3 date,
    string1 char(50),
    string2 char(50),
    string3 char(50),
    string4 char(50),
    string5 char(100),
    string6 char(50),
    string7 char(50),
    string8 char(50),
    string9 char(50),
    string10 char(255),
    string11 char(255),
    string12 char(255),
    castka1 decimal(16,2),
    castka2 decimal(16,2),
    celcislo1 integer,
    celcislo2 integer,
    decimal1 decimal(10,0)
  );
revoke all on "mzdy".workfl_zazn from "public";

create  index "mzdy".ix_workfl_zazn on "mzdy".workfl_zazn (klic, id_poz);
{ TABLE "mzdy".z_platby row size = 0 number of columns = 49 index size = 0 }
{ unload file name = z_platby.unl number of rows = 4318 }
create table "mzdy".z_platby 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    kod integer not null,
    c_dokladu integer not null,
    celk_castka decimal(16,2),
    zbyv_castka decimal(16,2),
    mes_castka decimal(16,2) not null,
    prech_castka decimal(16,2),
    mimor_splatka decimal(16,2),
    deponovat char(1),
    poradi integer not null,
    cislo_platby char(20),
    konst_symb char(4),
    var_symb char(10),
    spec_symb char(10),
    cislo_banky char(4),
    swift char(11),
    iban char(28),
    bank_spoj_odkud integer,
    jmeno_prij char(30),
    ulice char(45),
    misto char(48),
    psc char(5),
    spec_adresata char(10),
    ev_cislo char(100),
    poznamka char(35),
    opr_jmeno char(150),
    opr_ulice char(45),
    opr_cislo char(14),
    opr_misto char(48),
    opr_psc char(5),
    deti char(250),
    dat_doruc date,
    dat_prmoc date,
    eu_jmeno char(150),
    eu_ulice char(45),
    eu_cislo char(14),
    eu_misto char(48),
    eu_psc char(5),
    dep_odeslano date,
    dep_zaplaceno char(1),
    nahrada_zam char(1),
    dat_od date not null,
    dat_do date,
    vyp_procento decimal(3,1),
    srazit_dpp char(1),
    vychozi_ucet char(1),
    nezahrn_4exe char(1),
    svazane_c_dokl integer
  );
revoke all on "mzdy".z_platby from "public";

create unique  index "mzdy".z_ix_platby_id10 on "mzdy".z_platby (id);
create  index "mzdy".z_ix_platby_os_cis10 on "mzdy".z_platby (os_cislo, dat_od);
create  index "mzdy".z_ix_platby_c_dokl10 on "mzdy".z_platby (c_dokladu, dat_od);
{ TABLE "mzdy".z_prac_pom row size = 0 number of columns = 136 index size = 0 }
{ unload file name = z_prac_pom.unl number of rows = 1757 }
create table "mzdy".z_prac_pom 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    druh_pom char(1) not null,
    doba_uvazku char(1) not null,
    prac_str char(10) not null,
    skup_prac char(7),
    prac_kateg integer,
    jkz integer,
    pov_funkce char(12),
    mzd_stup integer,
    trida integer,
    typ_tt integer not null,
    zak_uvazek decimal(4,2) not null,
    hod_uvazek decimal(4,2) not null,
    smena integer,
    duvod_kratsi char(1),
    typ_kal integer not null,
    rozp_kateg char(3),
    vykaz char(3),
    rez_zakazka char(10),
    typ_mzdy integer not null,
    tarif decimal(16,2) not null,
    os_hodn decimal(16,2),
    tarif_cizi decimal(16,4),
    kurz_cizi decimal(16,4),
    pripl_vedeni decimal(16,2),
    pripl_zvlastni decimal(16,2),
    typ_premii integer,
    prem_cast decimal(16,2),
    odpr_pro_dov integer not null,
    neodpr_dny integer not null,
    ex_dov char(1),
    navaz_dov char(1),
    dov_narok decimal(3,1) not null,
    dov_cerpana decimal(5,2) not null,
    dov_kracena decimal(5,2) not null,
    dov_predmin decimal(5,2),
    zbyv_rd_min_rok decimal(5,2) not null,
    rd_letos decimal(5,2) not null,
    dov_dodatk_r decimal(5,2),
    dov_dodatk decimal(5,2),
    trv_dov char(1) not null,
    trv_nem char(1) not null,
    dny_ro_dov decimal(5,1) not null,
    hod_ro_dov decimal(7,2) not null,
    kcs_dov decimal(16,2) not null,
    kcs_dov_1 decimal(16,2) not null,
    kcs_dov_2 decimal(16,2) not null,
    kcs_dov_3 decimal(16,2) not null,
    kcs_dov_4 decimal(16,2) not null,
    prum_dov decimal(16,2),
    min_prum_dov decimal(16,2),
    dny_ro_nem decimal(6,1) not null,
    kcs_nem decimal(16,2) not null,
    prum_nem decimal(16,2),
    min_prum_nem decimal(16,2),
    dny_nemoci integer not null,
    praxe integer,
    praxe_dny integer,
    min_zakl decimal(16,2),
    min_pripl decimal(16,2),
    min_uvazek decimal(4,2),
    min_min_mzda decimal(16,2),
    potl_min_mzdy char(1),
    datum_nastupu date not null,
    duvod_nast char(3),
    datum_zmeny date,
    datum_ukonc date,
    duvod_ukonc char(3),
    zac_nem_poj date,
    eldp_1znak char(1),
    eldp_3znak char(1),
    eldp_akt char(1),
    eldp_nezahrn char(1),
    druh_pom_j char(2),
    zk_doba date,
    kl_po_zam char(4),
    zap_praxe char(8),
    zap_praxe_od date,
    zvys_ps_mes integer,
    zvys_ps_rok integer,
    zvys_ps_dat date,
    id_pracmist integer,
    id_pracmist_2 integer,
    datum_pr_sml date,
    datum_plan_odch date,
    datum_skut_nast date,
    premie_proc_ind decimal(5,2),
    dov_generovat char(1),
    dov_kratit char(1),
    doplnkova_1 char(50),
    doplnkova_2 date,
    cislo_platvym integer,
    cislo_dodatsml integer,
    nahr_hod_uvazek decimal(4,2),
    nahr_typ_kal integer,
    nahr_smena integer,
    jen_duchpoj char(1),
    maly_rozsah char(1),
    dat_doruc_vypov date,
    ucast_duchp_od date,
    misto_vykonu char(50),
    kpd_od date,
    kpd_do date,
    kpd_prum decimal(16,4),
    prum_rok decimal(16,4),
    vychozi_pomer integer,
    c_kmen_pom integer,
    isco08 char(7),
    ind_dn_sk char(1),
    zpusob_ukonc char(7),
    model_pd char(10),
    doch_karta char(15),
    mespr_vypl_nepr char(1),
    id_rez_projekt integer,
    tyd_prac_doba char(1),
    smluv_pom_uv decimal(6,4),
    mes_pom_uv decimal(6,4),
    prum_pom_uv decimal(6,4),
    cislo_sluz_oznac char(3),
    mesice_pracurad integer,
    eldp_vyd_cin_od date,
    legislat_uvazek decimal(4,2),
    id_agentury integer,
    vynimka char(1),
    zpracov_mzdy char(7),
    zpracov_pers char(7),
    mena_cizi char(3),
    ic_prav_vztahu char(15),
    doplnkova_3 char(10),
    odvod_odp_pol_od date,
    odvod_odp_pol_do date,
    naroc_prof_produch char(1),
    garance_castka decimal(16,2),
    homeof_typ_kal integer,
    homeof_smena integer
  );
revoke all on "mzdy".z_prac_pom from "public";

create  index "mzdy".z_ix_pom10 on "mzdy".z_prac_pom (os_cislo);
create unique  index "mzdy".z_ix_pom210 on "mzdy".z_prac_pom (os_cislo, cislo_pom);
create  index "mzdy".z_ix_pom310 on "mzdy".z_prac_pom (os_cislo, datum_nastupu, datum_ukonc);
create  index "mzdy".z_ix_pom410 on "mzdy".z_prac_pom (datum_nastupu);
create  index "mzdy".z_ix_pom510 on "mzdy".z_prac_pom (datum_ukonc);
{ TABLE "mzdy".z_prac_pom_po row size = 0 number of columns = 7 index size = 0 }
{ unload file name = z_prac_pom_po.unl number of rows = 3013 }
create table "mzdy".z_prac_pom_po 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    polozka char(20),
    hodnota char(80),
    datum_od date,
    datum_do date,
    skupina char(20)
  );
revoke all on "mzdy".z_prac_pom_po from "public";

create  index "mzdy".z_ix_pom_po110 on "mzdy".z_prac_pom_po (os_cislo, cislo_pom, polozka);
{ TABLE "mzdy".z_pracovnici row size = 0 number of columns = 159 index size = 0 }
{ unload file name = z_pracovnici.unl number of rows = 924 }
create table "mzdy".z_pracovnici 
  (
    os_cislo decimal(10,0),
    prijmeni char(40),
    jmeno char(40),
    titul char(25),
    rodne_jmeno char(40),
    rodne_cislo char(10),
    misto_narozeni char(48),
    rodin_stav char(1),
    narodnost char(2),
    st_prisl char(3),
    cislo_op char(12),
    cislo_pasu char(12),
    bran_pov char(2),
    ulice_trv char(45),
    tr_ulice char(30),
    tr_cislo char(14),
    misto_trv char(48),
    psc_trv char(5),
    posta_trv char(48),
    ulice_prech char(45),
    pr_ulice char(30),
    pr_cislo char(14),
    misto_prech char(48),
    psc_prech char(5),
    posta_prech char(48),
    kmen_str char(10),
    vypl_str integer,
    zaloha decimal(16,2),
    prech_zal integer,
    druh_slevy integer,
    zmen_prac_sch char(2),
    vyziv_os_nvc integer,
    vyziv_os_exm integer,
    druh_duchodu char(3),
    duchod_od date,
    clen_roh char(1),
    vybor_oh integer,
    datum_nastupu date,
    datum_vystupu date,
    datum_zmeny date,
    uhrn_mezd_letos decimal(16,2),
    uhrn_dohod decimal(16,2),
    kal_dny_dohod integer not null,
    uhrn_pojist decimal(16,2),
    dan_sleva char(1),
    sleva_od date,
    student char(1) not null,
    uhrn_dan_zakl decimal(16,2),
    uhrn_dani decimal(16,2),
    dan_zakl_cizi decimal(16,2) not null,
    dan_cizi decimal(16,2) not null,
    uhrn_nem decimal(16,2) not null,
    zakl_sraz_dan decimal(16,2) not null,
    srazk_dan decimal(16,2) not null,
    m_dan_zakl_cizi decimal(16,2) not null,
    m_dan_cizi decimal(16,2) not null,
    m_uhrn_nem decimal(16,2) not null,
    m_zakl_sraz_dan decimal(16,2) not null,
    m_srazk_dan decimal(16,2) not null,
    rocni_zuct char(1),
    m_dan_zakl decimal(16,2),
    m_dan decimal(16,2),
    rocni_odpoc decimal(16,2),
    odpoc_duch integer,
    odpoc_manz decimal(16,2),
    odpoc_dary decimal(16,2),
    dan_roc_zakl decimal(16,2),
    zust_minci decimal(16,2),
    dluh decimal(16,2),
    kal_dny integer,
    nahr_dny integer,
    kcs_duchod decimal(16,2),
    vek_duchod integer,
    mes_duchod decimal(3,1),
    odpr_roky_dov integer,
    odpr_dny_dov integer,
    zam_roky integer,
    zam_dny integer,
    zdrav_poj integer,
    zdrav_poj_od date,
    min_zdrav_poj integer,
    cis_poj_cizi char(10),
    deti_pro_duch integer,
    uhrn_dan_z_c decimal(16,2),
    uhrn_pojist_c decimal(16,2),
    eldp_adr char(1),
    eldp_zahr char(1),
    eldp_kod_st integer,
    nepoc_soc integer,
    kontr_podp_doby integer,
    prihl_jm char(128),
    model_pd char(10),
    titul_za char(25),
    sleva_do date,
    zps_od date,
    zps_do date,
    dan_nerez char(1),
    stravenky char(1),
    bez_dane char(1),
    datum_1_nast date,
    duchod_do date,
    op_plat date,
    pas_plat date,
    dat_duch_predp date,
    souhlas_cud char(1),
    souhlas_cud_mzd char(1),
    uhrn_dsleva decimal(16,2),
    uhrn_dbonus decimal(16,2),
    m_dsleva decimal(16,2),
    m_dbonus decimal(16,2),
    dsleva_cizi decimal(16,2),
    dbonus_cizi decimal(16,2),
    id_agentury integer,
    id_firmy integer,
    uhrn_superhr decimal(16,2),
    uhrn_sp_firma decimal(16,2),
    uhrn_zp_firma decimal(16,2),
    soc_uhrn_vz decimal(16,2),
    zdrav_uhrn_vz decimal(16,2),
    soc_uhrn_vz_x decimal(16,2),
    zdrav_uhrn_vz_x decimal(16,2),
    druhy_pilier_sk char(1),
    zac_nem_poj date,
    duch_poj_ciz char(1),
    prech_stat_adr char(2),
    trv_postcode char(11),
    prech_postcode char(11),
    cssz_ecp char(10),
    doch_karta char(15),
    okres_nar char(20),
    stat_nar char(2),
    stat_adr char(2),
    id_podniku integer not null,
    e101 char(1),
    znc_max decimal(16,2),
    uhrn_soc_poj decimal(16,2),
    uhrn_zdrav_poj decimal(16,2),
    cislo_duch_spor char(10),
    smluv_netto decimal(16,2),
    smluv_netto_cizi decimal(16,2),
    uhrn_dohod_cizi decimal(16,2),
    uhrn_sp_cizi decimal(16,2),
    uhrn_zp_cizi decimal(16,2),
    evid_cislo char(32),
    odpoc_zp char(1),
    dcis_nerezidenta char(20),
    typdcis_nerezid char(1),
    statdcis_nerezid char(2),
    cdokl_nerezid char(15),
    typdokl_nerezid char(1),
    statdokl_nerezid char(2),
    dat_ukonczam_cr date,
    doktorand char(1),
    prijmy_doh decimal(16,2),
    vydavatel_pasu char(40),
    dat_zacatkuzam_cr date,
    sleva_sp_fir_stav char(1),
    sleva_sp_fir_druh char(1),
    sleva_sp_duch char(1)
  );
revoke all on "mzdy".z_pracovnici from "public";

create unique  index "mzdy".z_ix_prac10 on "mzdy".z_pracovnici (os_cislo);
create  index "mzdy".z_ix_pri10 on "mzdy".z_pracovnici (prijmeni, jmeno);
create unique  index "mzdy".z_ix_prac_str10 on "mzdy".z_pracovnici (kmen_str, os_cislo);
create unique  index "mzdy".z_ix_prac_idposc10 on "mzdy".z_pracovnici (id_podniku, os_cislo, datum_vystupu);
create  index "mzdy".z_ix_pracovn_rc10 on "mzdy".z_pracovnici (rodne_cislo);
create  index "mzdy".z_ix_pra_stra10 on "mzdy".z_pracovnici (stravenky);
create  index "mzdy".z_ix_prac_110 on "mzdy".z_pracovnici (id_podniku, os_cislo, prijmeni, jmeno, titul, rodne_jmeno);
create  index "mzdy".z_ix_prac_210 on "mzdy".z_pracovnici (min_zdrav_poj, id_podniku, os_cislo);
{ TABLE "mzdy".z_priplatky row size = 0 number of columns = 15 index size = 0 }
{ unload file name = z_priplatky.unl number of rows = 486 }
create table "mzdy".z_priplatky 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    kod integer,
    castka decimal(16,2),
    disp_str char(10),
    plati_od date,
    plati_do date,
    agenda char(20),
    perioda integer,
    castka_cizi decimal(16,2),
    mena_cizi char(3),
    kurz_cizi decimal(16,4),
    id_vazby integer,
    typ_vazby char(2),
    pozn char(60)
  );
revoke all on "mzdy".z_priplatky from "public";

create  index "mzdy".z_ix_pripl10 on "mzdy".z_priplatky (os_cislo);
create  index "mzdy".z_ix_pripl_dat10 on "mzdy".z_priplatky (os_cislo, plati_od, plati_do);
create  index "mzdy".z_ix_pripl_ag10 on "mzdy".z_priplatky (os_cislo, cislo_pom, kod, agenda);
{ TABLE "mzdy".z_roc_zuct row size = 0 number of columns = 22 index size = 0 }
{ unload file name = z_roc_zuct.unl number of rows = 0 }
create table "mzdy".z_roc_zuct 
  (
    os_cislo decimal(10,0) not null,
    castka decimal(16,2),
    bolestne decimal(16,2),
    kdy integer,
    provedeno date,
    hypoteka decimal(16,2),
    stavebni decimal(16,2),
    skutecnost decimal(16,2),
    uhrn_dan_zakl decimal(16,2),
    uhrn_pojist decimal(16,2),
    uhrn_dan_z_c decimal(16,2),
    uhrn_pojist_c decimal(16,2),
    slev_penz_p decimal(16,2),
    slev_penz_z decimal(16,2),
    penz_prip decimal(16,2),
    ziv_poj decimal(16,2),
    slev_deti decimal(16,2),
    prisp_odb decimal(16,2),
    deti_sleva decimal(16,2),
    deti_bonus decimal(16,2),
    dsleva_c decimal(16,2),
    dbonus_c decimal(16,2)
  );
revoke all on "mzdy".z_roc_zuct from "public";

create  index "mzdy".z_ix_roc_zuct10 on "mzdy".z_roc_zuct (os_cislo);
{ TABLE "mzdy".z_rucni row size = 0 number of columns = 15 index size = 0 }
{ unload file name = z_rucni.unl number of rows = 0 }
create table "mzdy".z_rucni 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    prac_str char(10),
    kod integer,
    c_dokladu integer,
    dat_od date,
    dat_do date,
    dny decimal(5,1),
    hodiny decimal(7,2),
    sazba decimal(16,2),
    castka decimal(16,2),
    prizn_aut char(1),
    prac_kateg integer,
    datum date,
    id_podniku integer
  );
revoke all on "mzdy".z_rucni from "public";

create  index "mzdy".z_ix_ruc10 on "mzdy".z_rucni (os_cislo);
{ TABLE "mzdy".z_rzdane row size = 0 number of columns = 93 index size = 0 }
{ unload file name = z_rzdane.unl number of rows = 7615 }
create table "mzdy".z_rzdane 
  (
    rok integer not null,
    os_cislo decimal(10,0) not null,
    poradi integer not null,
    poradi_datum date,
    zmenil char(64),
    provest char(1),
    mesic integer,
    datum date,
    prijmy decimal(16,2),
    prijmy_doh decimal(16,2),
    pojist decimal(16,2),
    pojist_sp decimal(16,2),
    pojist_zp decimal(16,2),
    dan decimal(16,2),
    sleva decimal(16,2),
    bonus decimal(16,2),
    mprijmy decimal(16,2),
    mprijmy_doh decimal(16,2),
    mpojist decimal(16,2),
    mpojist_sp decimal(16,2),
    mpojist_zp decimal(16,2),
    mdan decimal(16,2),
    msleva decimal(16,2),
    mbonus decimal(16,2),
    srazk_dan decimal(16,2),
    zam_premie integer,
    zam_premie_zakl decimal(16,2),
    zam_premie_pocm integer,
    mzam_premie_zakl decimal(16,2),
    mzam_premie_pocm integer,
    zam_premie_uprzak decimal(16,2),
    zam_premie_castka decimal(16,2),
    odp_zakl decimal(16,2),
    odp_zakl_opr decimal(16,2),
    vyse_duch decimal(16,2),
    odp_manzel decimal(16,2),
    odp_manzel_opr decimal(16,2),
    odp_manzel_prijmy decimal(16,2),
    odp_manzel_mes integer,
    odp_cinv decimal(16,2),
    odp_cinv_opr decimal(16,2),
    odp_pinv decimal(16,2),
    odp_pinv_opr decimal(16,2),
    odp_ztpp decimal(16,2),
    odp_ztpp_opr decimal(16,2),
    odp_stud decimal(16,2),
    odp_stud_opr decimal(16,2),
    odp_dar decimal(16,2),
    odp_dar_neupr decimal(16,2),
    odp_zkouska decimal(16,2),
    prip_zkouska decimal(16,2),
    odp_ucel_spor decimal(16,2),
    odp_uroky_mes decimal(16,2),
    odp_uroky_skut decimal(16,2),
    odp_uroky_neupr decimal(16,2),
    odp_penz_mes decimal(16,2),
    odp_penz_skut decimal(16,2),
    odp_penz_neupr decimal(16,2),
    odp_zivp_mes decimal(16,2),
    odp_zivp_skut decimal(16,2),
    odp_zivp_neupr decimal(16,2),
    odp_odbp_mes decimal(16,2),
    odp_odbp_skut decimal(16,2),
    odp_odbp_neupr decimal(16,2),
    nezdan_celkem decimal(16,2),
    sleva_celkem decimal(16,2),
    zdan_mzda decimal(16,2),
    srazit_vse integer,
    poukaz_dan integer,
    odp_deti decimal(16,2),
    odp_deti_opr decimal(16,2),
    sleva_skut decimal(16,2),
    bonus_skut decimal(16,2),
    dan_skut decimal(16,2),
    dan_skut_sleva decimal(16,2),
    dan_skut_sleva1 decimal(16,2),
    dan_rozdil decimal(16,2),
    dan_rozdil1 decimal(16,2),
    bonus_rozdil decimal(16,2),
    kompenzace decimal(16,2),
    vyplaceno decimal(16,2),
    je_ok char(1),
    pocdeti integer,
    mesdeti integer,
    bonus2 decimal(16,2),
    cinnost1pol char(1),
    mbonus2 decimal(16,2),
    mcinnost1pol char(1),
    odp_deti2 decimal(16,2),
    odp_deti_opr2 decimal(16,2),
    dan_nerez90 char(1),
    typ_bonus_ur char(1),
    odp_pece decimal(16,2)
  );
revoke all on "mzdy".z_rzdane from "public";

create unique  index "mzdy".z_ix_rzdane10 on "mzdy".z_rzdane (rok, os_cislo, poradi);
{ TABLE "mzdy".workfl_stavy_podm row size = 0 number of columns = 14 index size = 0 }
{ unload file name = workfl_stavy_podm.unl number of rows = 0 }
create table "mzdy".workfl_stavy_podm 
  (
    id integer not null,
    id_master integer not null,
    faze integer not null,
    id_stavy integer not null,
    poradi integer not null,
    vyraz char(100) not null,
    validace char(456),
    akce char(800),
    adresat char(175),
    next_faze integer not null,
    cas char(18) not null,
    zapsal decimal(10,0) not null,
    oznam char(210),
    sys_stav char(1)
  );
revoke all on "mzdy".workfl_stavy_podm from "public";

create unique  index "mzdy".ix_wf_podm on "mzdy".workfl_stavy_podm (id_stavy, poradi);
{ TABLE "mzdy".workfl_proc row size = 0 number of columns = 21 index size = 0 }
{ unload file name = workfl_proc.unl number of rows = 0 }
create table "mzdy".workfl_proc 
  (
    id integer not null,
    id_poz integer not null,
    poradi integer not null,
    stav char(16) not null,
    sys_stav char(1),
    substav char(16),
    faze integer,
    resitel decimal(10,0),
    duvod char(999),
    adresat char(600),
    vyraz char(100),
    faze_akt integer,
    validace char(456),
    akce char(800),
    adresat_neupr char(100),
    vlastnosti_stavu char(200),
    oznam char(600),
    archiv char(1),
    datum date not null,
    cas char(6),
    zapsal decimal(10,0) not null
  );
revoke all on "mzdy".workfl_proc from "public";

create  index "mzdy".ix_workfl_proc on "mzdy".workfl_proc (id_poz, archiv, poradi);
create  index "mzdy".ix_workfl_proc2 on "mzdy".workfl_proc (adresat);
create  index "mzdy".ix_workfl_proc3 on "mzdy".workfl_proc (oznam);
create  index "mzdy".ix_workfl_proc4 on "mzdy".workfl_proc (stav);
create  index "mzdy".ix_workfl_proc5 on "mzdy".workfl_proc (sys_stav);
create  index "mzdy".ix_workfl_proc6 on "mzdy".workfl_proc (resitel);
{ TABLE "mzdy".workfl_slc_zalohy row size = 0 number of columns = 17 index size = 0 }
{ unload file name = workfl_slc_zalohy.unl number of rows = 0 }
create table "mzdy".workfl_slc_zalohy 
  (
    id integer not null,
    ev_cislo integer not null,
    druh char(3),
    castka decimal(16,2) not null,
    mena char(3) not null,
    poz_dne date,
    poz_osc decimal(10,0),
    schv_dne date,
    schv_osc decimal(10,0),
    vypl_dne date,
    vypl_osc decimal(10,0),
    vypl_doklad char(20),
    vypl_jak char(1),
    hp_davka integer,
    castka_tuz decimal(16,2),
    cis_bk char(15),
    zauct_dne date
  );
revoke all on "mzdy".workfl_slc_zalohy from "public";

{ TABLE "mzdy".workfl_sluz_cesty row size = 0 number of columns = 87 index size = 0 }
{ unload file name = workfl_sluz_cesty.unl number of rows = 0 }
create table "mzdy".workfl_sluz_cesty 
  (
    ev_cislo integer not null,
    par_ev_cislo integer,
    cislo char(25),
    os_cislo decimal(10,0) not null,
    typ char(1),
    poc_misto char(40),
    dat_od date not null,
    cas_od char(5),
    kon_misto char(40),
    dat_do date,
    cas_do char(5),
    cil char(80),
    ucel char(80),
    spolucestujici char(120),
    spolu1 decimal(10,0),
    spolu2 decimal(10,0),
    spolu3 decimal(10,0),
    spolu4 decimal(10,0),
    spolu5 decimal(10,0),
    spolu6 decimal(10,0),
    spolu7 decimal(10,0),
    spolu8 decimal(10,0),
    spolu9 decimal(10,0),
    spolu10 decimal(10,0),
    druh_dopr char(30),
    spz char(9),
    sazba_zn decimal(16,3),
    pohonna_hmota char(15),
    cena_1l_ph decimal(5,3),
    cena1lphz decimal(7,3),
    cena1lphz_m char(3),
    prum_spotreba decimal(5,2),
    spotreba_mesto decimal(5,2),
    spotreba_mimo decimal(5,2),
    cislo_poj char(15),
    vyuct_dne date,
    vyuct_obdobi date,
    vyuct_provedl char(64),
    vyuct_prov_osc decimal(10,0),
    dny integer,
    poc_dnu_diet integer,
    diety_nakl decimal(16,2),
    zp_vypl char(1),
    nakl_str char(10),
    naklady decimal(16,2),
    zdroj char(1),
    vytvor_dne date,
    vytvoril char(64),
    souhl_dne date,
    povolil_osc decimal(10,0),
    povolil_dne date,
    zadovyuct_dne date,
    prub_schval_osc decimal(10,0),
    prub_schval_dne date,
    vdj_schval_osc decimal(10,0),
    vdj_schval_dne date,
    vyuct_schval_osc decimal(10,0),
    vyuct_schval_dne date,
    vyuct_souhl_dne date,
    cstzmprac char(1),
    zauct integer,
    zauct_dne date,
    zauct_kurz_dne date,
    zauct_prefakt char(1),
    zauct_prefakt_org char(20),
    pzn char(120),
    kapes_proc integer,
    kapes_t_proc integer,
    druh char(7),
    cil_zeme char(45),
    predp_nakl decimal(16,2),
    predp_nakl_mena char(3),
    id_proj integer,
    cislo_pom integer,
    let char(1),
    let_o date,
    let_p date,
    let_oti char(13),
    let_pti char(13),
    ubyt char(1),
    aut_puj char(1),
    mdata char(1),
    vizum char(1),
    ost char(512),
    platne_poj char(1),
    cislo_uc_dokl char(20),
    uc_obdobi date
  );
revoke all on "mzdy".workfl_sluz_cesty from "public";

create  index "mzdy".ix_wfcest_zam10 on "mzdy".workfl_sluz_cesty (os_cislo);
create  index "mzdy".ix_wfcest_zam210 on "mzdy".workfl_sluz_cesty (os_cislo, dat_od, dat_do);
{ TABLE "mzdy".zamky row size = 0 number of columns = 4 index size = 0 }
{ unload file name = zamky.unl number of rows = 0 }
create table "mzdy".zamky 
  (
    agenda char(40) not null,
    uziv char(64) not null,
    zamkl char(64) not null,
    id_podniku integer not null
  );
revoke all on "mzdy".zamky from "public";

create  index "mzdy".ix_zam_ag on "mzdy".zamky (agenda, uziv);
{ TABLE "mzdy".zav_zam row size = 0 number of columns = 13 index size = 0 }
{ unload file name = zav_zam.unl number of rows = 0 }
create table "mzdy".zav_zam 
  (
    id_zavazku integer not null,
    os_cislo decimal(10,0) not null,
    druh char(30) not null,
    dat_od date,
    datum_do date,
    splneno date,
    cesta_soubor char(150),
    poznamka char(60),
    nazev_soubor char(50),
    id_blob integer,
    sdilene_uloziste char(150),
    inventarni_cislo char(20),
    vyrobni_cislo char(30)
  );
revoke all on "mzdy".zav_zam from "public";

create  index "mzdy".ix_zav_zam on "mzdy".zav_zam (os_cislo);
{ TABLE "mzdy".zp_evidence row size = 0 number of columns = 15 index size = 0 }
{ unload file name = zp_evidence.unl number of rows = 0 }
create table "mzdy".zp_evidence 
  (
    ident integer not null,
    os_cislo decimal(10,0) not null,
    pojistovna integer not null,
    c_smlouvy char(25),
    nar_prisp char(1) not null,
    sml_od date,
    sml_do date,
    banka char(4),
    cislo_platby char(20),
    konst_symb char(4),
    spec_symb char(10),
    var_symb char(10),
    castka decimal(16,2),
    castka_zam decimal(16,2),
    prenos integer not null
  );
revoke all on "mzdy".zp_evidence from "public";

create  index "mzdy".ix_zpev1 on "mzdy".zp_evidence (os_cislo, sml_od, sml_do);
create  index "mzdy".ix_zpev2 on "mzdy".zp_evidence (os_cislo, pojistovna);
{ TABLE "mzdy".zpr_adresati row size = 0 number of columns = 4 index size = 0 }
{ unload file name = zpr_adresati.unl number of rows = 0 }
create table "mzdy".zpr_adresati 
  (
    typ_ident integer not null,
    hodnota_ident char(20) not null,
    typ_adr integer not null,
    adresa char(200)
  );
revoke all on "mzdy".zpr_adresati from "public";

create  index "mzdy".ix_adr_typ_hod on "mzdy".zpr_adresati (typ_ident, hodnota_ident);
{ TABLE "mzdy".zpr_notif row size = 0 number of columns = 22 index size = 0 }
{ unload file name = zpr_notif.unl number of rows = 49 }
create table "mzdy".zpr_notif 
  (
    id integer not null,
    typ integer not null,
    nazev char(250),
    typ_podminky integer not null,
    spustit char(17) not null,
    perioda integer not null,
    perioda_typ integer not null,
    svatky integer not null,
    datum_od date,
    datum_do date,
    cas_od char(6),
    cas_do char(6),
    predmet char(80),
    grupa integer,
    priorita integer,
    storno integer not null,
    sql_prikaz_typ integer not null,
    sql_prikaz integer,
    telo integer,
    aktivni integer not null,
    os_cislo decimal(10,0),
    zdroj_info char(24)
  );
revoke all on "mzdy".zpr_notif from "public";

create  index "mzdy".ix_zprnotif on "mzdy".zpr_notif (typ, datum_od, datum_do, aktivni);
{ TABLE "mzdy".zpr_notif_adr row size = 0 number of columns = 8 index size = 0 }
{ unload file name = zpr_notif_adr.unl number of rows = 49 }
create table "mzdy".zpr_notif_adr 
  (
    not_id integer not null,
    typ integer not null,
    oj_typ integer not null,
    oj char(10) not null,
    sql_prikaz integer,
    vztah integer not null,
    cil integer not null,
    adresa char(250)
  );
revoke all on "mzdy".zpr_notif_adr from "public";

create  index "mzdy".ix_not_adr_id on "mzdy".zpr_notif_adr (not_id);
{ TABLE "mzdy".zpr_notif_prilohy row size = 0 number of columns = 4 index size = 0 }
{ unload file name = zpr_notif_prilohy.unl number of rows = 0 }
create table "mzdy".zpr_notif_prilohy 
  (
    id_notif integer not null,
    poradi integer not null,
    id_blob integer not null,
    typ char(200)
  );
revoke all on "mzdy".zpr_notif_prilohy from "public";

create  index "mzdy".ix_prilo_id_not on "mzdy".zpr_notif_prilohy (id_notif, poradi);
{ TABLE "mzdy".zastup_zapnuti row size = 0 number of columns = 1 index size = 0 }
{ unload file name = zastup_zapnuti.unl number of rows = 0 }
create table "mzdy".zastup_zapnuti 
  (
    indik char(1) not null
  );
revoke all on "mzdy".zastup_zapnuti from "public";

{ TABLE "mzdy".zalohy row size = 0 number of columns = 5 index size = 0 }
{ unload file name = zalohy.unl number of rows = 0 }
create table "mzdy".zalohy 
  (
    os_cislo decimal(10,0) not null,
    kod integer not null,
    c_dokladu integer,
    castka decimal(16,2) not null,
    datum date
  );
revoke all on "mzdy".zalohy from "public";

create  index "mzdy".ix_zalohy on "mzdy".zalohy (os_cislo);
{ TABLE "mzdy".z_stred row size = 0 number of columns = 21 index size = 0 }
{ unload file name = z_stred.unl number of rows = 34 }
create table "mzdy".z_stred 
  (
    str char(10) not null,
    nazev char(80) not null,
    nazev2 char(80),
    cis_divize integer,
    skup_str integer,
    celk_castka decimal(16,2),
    cerp_castka decimal(16,2),
    plan_brut decimal(16,2),
    brutto decimal(16,2),
    pobocka integer,
    priznaky char(10),
    typ char(1),
    plati_od date,
    plati_do date,
    cena_nizsi decimal(16,2),
    cena_vyssi decimal(16,2),
    id_str integer,
    id_podniku integer not null,
    id_projektu integer,
    id_zakazky integer,
    generovat_rezii integer
  );
revoke all on "mzdy".z_stred from "public";

create unique  index "mzdy".z_ix_str_idpstr10 on "mzdy".z_stred (id_podniku, str);
create  index "mzdy".z_ix_stred_110 on "mzdy".z_stred (skup_str, id_podniku);
{ TABLE "mzdy".zpr_prilohy row size = 0 number of columns = 6 index size = 0 }
{ unload file name = zpr_prilohy.unl number of rows = 4494 }
create table "mzdy".zpr_prilohy 
  (
    id_zpravy integer not null,
    poradi integer not null,
    id_blob integer,
    typ char(200),
    odkaz_id_blob integer,
    odkaz_pouziti_blob integer
  );
revoke all on "mzdy".zpr_prilohy from "public";

{ TABLE "mzdy".zpr_sab_emaily row size = 0 number of columns = 2 index size = 0 }
{ unload file name = zpr_sab_emaily.unl number of rows = 0 }
create table "mzdy".zpr_sab_emaily 
  (
    id_sablony integer not null,
    e_mail char(256)
  );
revoke all on "mzdy".zpr_sab_emaily from "public";

{ TABLE "mzdy".zpr_sab_oscisla row size = 0 number of columns = 2 index size = 0 }
{ unload file name = zpr_sab_oscisla.unl number of rows = 0 }
create table "mzdy".zpr_sab_oscisla 
  (
    id_sablony integer not null,
    os_cislo decimal(10,0)
  );
revoke all on "mzdy".zpr_sab_oscisla from "public";

{ TABLE "mzdy".zz_pracovnici row size = 0 number of columns = 159 index size = 0 }
{ unload file name = zz_pracovnici.unl number of rows = 753 }
create table "mzdy".zz_pracovnici 
  (
    os_cislo decimal(10,0),
    prijmeni char(40),
    jmeno char(40),
    titul char(25),
    rodne_jmeno char(40),
    rodne_cislo char(10),
    misto_narozeni char(48),
    rodin_stav char(1),
    narodnost char(2),
    st_prisl char(3),
    cislo_op char(12),
    cislo_pasu char(12),
    bran_pov char(2),
    ulice_trv char(45),
    tr_ulice char(30),
    tr_cislo char(14),
    misto_trv char(48),
    psc_trv char(5),
    posta_trv char(48),
    ulice_prech char(45),
    pr_ulice char(30),
    pr_cislo char(14),
    misto_prech char(48),
    psc_prech char(5),
    posta_prech char(48),
    kmen_str char(10),
    vypl_str integer,
    zaloha decimal(16,2),
    prech_zal integer,
    druh_slevy integer,
    zmen_prac_sch char(2),
    vyziv_os_nvc integer,
    vyziv_os_exm integer,
    druh_duchodu char(3),
    duchod_od date,
    clen_roh char(1),
    vybor_oh integer,
    datum_nastupu date,
    datum_vystupu date,
    datum_zmeny date,
    uhrn_mezd_letos decimal(16,2),
    uhrn_dohod decimal(16,2),
    kal_dny_dohod integer not null,
    uhrn_pojist decimal(16,2),
    dan_sleva char(1),
    sleva_od date,
    student char(1) not null,
    uhrn_dan_zakl decimal(16,2),
    uhrn_dani decimal(16,2),
    dan_zakl_cizi decimal(16,2) not null,
    dan_cizi decimal(16,2) not null,
    uhrn_nem decimal(16,2) not null,
    zakl_sraz_dan decimal(16,2) not null,
    srazk_dan decimal(16,2) not null,
    m_dan_zakl_cizi decimal(16,2) not null,
    m_dan_cizi decimal(16,2) not null,
    m_uhrn_nem decimal(16,2) not null,
    m_zakl_sraz_dan decimal(16,2) not null,
    m_srazk_dan decimal(16,2) not null,
    rocni_zuct char(1),
    m_dan_zakl decimal(16,2),
    m_dan decimal(16,2),
    rocni_odpoc decimal(16,2),
    odpoc_duch integer,
    odpoc_manz decimal(16,2),
    odpoc_dary decimal(16,2),
    dan_roc_zakl decimal(16,2),
    zust_minci decimal(16,2),
    dluh decimal(16,2),
    kal_dny integer,
    nahr_dny integer,
    kcs_duchod decimal(16,2),
    vek_duchod integer,
    mes_duchod decimal(3,1),
    odpr_roky_dov integer,
    odpr_dny_dov integer,
    zam_roky integer,
    zam_dny integer,
    zdrav_poj integer,
    zdrav_poj_od date,
    min_zdrav_poj integer,
    cis_poj_cizi char(10),
    deti_pro_duch integer,
    uhrn_dan_z_c decimal(16,2),
    uhrn_pojist_c decimal(16,2),
    eldp_adr char(1),
    eldp_zahr char(1),
    eldp_kod_st integer,
    nepoc_soc integer,
    kontr_podp_doby integer,
    prihl_jm char(128),
    model_pd char(10),
    titul_za char(25),
    sleva_do date,
    zps_od date,
    zps_do date,
    dan_nerez char(1),
    stravenky char(1),
    bez_dane char(1),
    datum_1_nast date,
    duchod_do date,
    op_plat date,
    pas_plat date,
    dat_duch_predp date,
    souhlas_cud char(1),
    souhlas_cud_mzd char(1),
    uhrn_dsleva decimal(16,2),
    uhrn_dbonus decimal(16,2),
    m_dsleva decimal(16,2),
    m_dbonus decimal(16,2),
    dsleva_cizi decimal(16,2),
    dbonus_cizi decimal(16,2),
    id_agentury integer,
    id_firmy integer,
    uhrn_superhr decimal(16,2),
    uhrn_sp_firma decimal(16,2),
    uhrn_zp_firma decimal(16,2),
    soc_uhrn_vz decimal(16,2),
    zdrav_uhrn_vz decimal(16,2),
    soc_uhrn_vz_x decimal(16,2),
    zdrav_uhrn_vz_x decimal(16,2),
    druhy_pilier_sk char(1),
    zac_nem_poj date,
    duch_poj_ciz char(1),
    prech_stat_adr char(2),
    trv_postcode char(11),
    prech_postcode char(11),
    cssz_ecp char(10),
    doch_karta char(15),
    okres_nar char(20),
    stat_nar char(2),
    stat_adr char(2),
    id_podniku integer not null,
    e101 char(1),
    znc_max decimal(16,2),
    uhrn_soc_poj decimal(16,2),
    uhrn_zdrav_poj decimal(16,2),
    cislo_duch_spor char(10),
    smluv_netto decimal(16,2),
    smluv_netto_cizi decimal(16,2),
    uhrn_dohod_cizi decimal(16,2),
    uhrn_sp_cizi decimal(16,2),
    uhrn_zp_cizi decimal(16,2),
    evid_cislo char(32),
    odpoc_zp char(1),
    dcis_nerezidenta char(20),
    typdcis_nerezid char(1),
    statdcis_nerezid char(2),
    cdokl_nerezid char(15),
    typdokl_nerezid char(1),
    statdokl_nerezid char(2),
    dat_ukonczam_cr date,
    doktorand char(1),
    prijmy_doh decimal(16,2),
    vydavatel_pasu char(40),
    dat_zacatkuzam_cr date,
    sleva_sp_fir_stav char(1),
    sleva_sp_fir_druh char(1),
    sleva_sp_duch char(1)
  );
revoke all on "mzdy".zz_pracovnici from "public";

create unique  index "mzdy".zz_ix_prac10 on "mzdy".zz_pracovnici (os_cislo);
create  index "mzdy".zz_ix_pri10 on "mzdy".zz_pracovnici (prijmeni, jmeno);
create unique  index "mzdy".zz_ix_prac_str10 on "mzdy".zz_pracovnici (kmen_str, os_cislo);
create unique  index "mzdy".zz_ix_prac_idposc10 on "mzdy".zz_pracovnici (id_podniku, os_cislo, datum_vystupu);
create  index "mzdy".zz_ix_pracovn_rc10 on "mzdy".zz_pracovnici (rodne_cislo);
create  index "mzdy".zz_ix_pra_stra10 on "mzdy".zz_pracovnici (stravenky);
create  index "mzdy".zz_ix_prac_110 on "mzdy".zz_pracovnici (id_podniku, os_cislo, prijmeni, jmeno, titul, rodne_jmeno);
create  index "mzdy".zz_ix_prac_210 on "mzdy".zz_pracovnici (min_zdrav_poj, id_podniku, os_cislo);
{ TABLE "mzdy".zz_pracovnici_po row size = 0 number of columns = 5 index size = 0 }
{ unload file name = zz_pracovnici_po.unl number of rows = 97 }
create table "mzdy".zz_pracovnici_po 
  (
    os_cislo decimal(10,0) not null,
    polozka char(20),
    hodnota char(80),
    dat_od date,
    dat_do date
  );
revoke all on "mzdy".zz_pracovnici_po from "public";

{ TABLE "mzdy".zz_priplatky row size = 0 number of columns = 15 index size = 0 }
{ unload file name = zz_priplatky.unl number of rows = 274 }
create table "mzdy".zz_priplatky 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    kod integer,
    castka decimal(16,2),
    disp_str char(10),
    plati_od date,
    plati_do date,
    agenda char(20),
    perioda integer,
    castka_cizi decimal(16,2),
    mena_cizi char(3),
    kurz_cizi decimal(16,4),
    id_vazby integer,
    typ_vazby char(2),
    pozn char(60)
  );
revoke all on "mzdy".zz_priplatky from "public";

create  index "mzdy".zz_ix_pripl10 on "mzdy".zz_priplatky (os_cislo);
create  index "mzdy".zz_ix_pripl_dat10 on "mzdy".zz_priplatky (os_cislo, plati_od, plati_do);
create  index "mzdy".zz_ix_pripl_ag10 on "mzdy".zz_priplatky (os_cislo, cislo_pom, kod, agenda);
{ TABLE "mzdy".zz_rucni row size = 0 number of columns = 15 index size = 0 }
{ unload file name = zz_rucni.unl number of rows = 0 }
create table "mzdy".zz_rucni 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer,
    prac_str char(10),
    kod integer,
    c_dokladu integer,
    dat_od date,
    dat_do date,
    dny decimal(5,1),
    hodiny decimal(7,2),
    sazba decimal(16,2),
    castka decimal(16,2),
    prizn_aut char(1),
    prac_kateg integer,
    datum date,
    id_podniku integer
  );
revoke all on "mzdy".zz_rucni from "public";

create  index "mzdy".zz_ix_ruc10 on "mzdy".zz_rucni (os_cislo);
{ TABLE "mzdy".zz_rzdane row size = 0 number of columns = 93 index size = 0 }
{ unload file name = zz_rzdane.unl number of rows = 0 }
create table "mzdy".zz_rzdane 
  (
    rok integer not null,
    os_cislo decimal(10,0) not null,
    poradi integer not null,
    poradi_datum date,
    zmenil char(64),
    provest char(1),
    mesic integer,
    datum date,
    prijmy decimal(16,2),
    prijmy_doh decimal(16,2),
    pojist decimal(16,2),
    pojist_sp decimal(16,2),
    pojist_zp decimal(16,2),
    dan decimal(16,2),
    sleva decimal(16,2),
    bonus decimal(16,2),
    mprijmy decimal(16,2),
    mprijmy_doh decimal(16,2),
    mpojist decimal(16,2),
    mpojist_sp decimal(16,2),
    mpojist_zp decimal(16,2),
    mdan decimal(16,2),
    msleva decimal(16,2),
    mbonus decimal(16,2),
    srazk_dan decimal(16,2),
    zam_premie integer,
    zam_premie_zakl decimal(16,2),
    zam_premie_pocm integer,
    mzam_premie_zakl decimal(16,2),
    mzam_premie_pocm integer,
    zam_premie_uprzak decimal(16,2),
    zam_premie_castka decimal(16,2),
    odp_zakl decimal(16,2),
    odp_zakl_opr decimal(16,2),
    vyse_duch decimal(16,2),
    odp_manzel decimal(16,2),
    odp_manzel_opr decimal(16,2),
    odp_manzel_prijmy decimal(16,2),
    odp_manzel_mes integer,
    odp_cinv decimal(16,2),
    odp_cinv_opr decimal(16,2),
    odp_pinv decimal(16,2),
    odp_pinv_opr decimal(16,2),
    odp_ztpp decimal(16,2),
    odp_ztpp_opr decimal(16,2),
    odp_stud decimal(16,2),
    odp_stud_opr decimal(16,2),
    odp_dar decimal(16,2),
    odp_dar_neupr decimal(16,2),
    odp_zkouska decimal(16,2),
    prip_zkouska decimal(16,2),
    odp_ucel_spor decimal(16,2),
    odp_uroky_mes decimal(16,2),
    odp_uroky_skut decimal(16,2),
    odp_uroky_neupr decimal(16,2),
    odp_penz_mes decimal(16,2),
    odp_penz_skut decimal(16,2),
    odp_penz_neupr decimal(16,2),
    odp_zivp_mes decimal(16,2),
    odp_zivp_skut decimal(16,2),
    odp_zivp_neupr decimal(16,2),
    odp_odbp_mes decimal(16,2),
    odp_odbp_skut decimal(16,2),
    odp_odbp_neupr decimal(16,2),
    nezdan_celkem decimal(16,2),
    sleva_celkem decimal(16,2),
    zdan_mzda decimal(16,2),
    srazit_vse integer,
    poukaz_dan integer,
    odp_deti decimal(16,2),
    odp_deti_opr decimal(16,2),
    sleva_skut decimal(16,2),
    bonus_skut decimal(16,2),
    dan_skut decimal(16,2),
    dan_skut_sleva decimal(16,2),
    dan_skut_sleva1 decimal(16,2),
    dan_rozdil decimal(16,2),
    dan_rozdil1 decimal(16,2),
    bonus_rozdil decimal(16,2),
    kompenzace decimal(16,2),
    vyplaceno decimal(16,2),
    je_ok char(1),
    pocdeti integer,
    mesdeti integer,
    bonus2 decimal(16,2),
    cinnost1pol char(1),
    mbonus2 decimal(16,2),
    mcinnost1pol char(1),
    odp_deti2 decimal(16,2),
    odp_deti_opr2 decimal(16,2),
    dan_nerez90 char(1),
    typ_bonus_ur char(1),
    odp_pece decimal(16,2)
  );
revoke all on "mzdy".zz_rzdane from "public";

create unique  index "mzdy".zz_ix_rzdane10 on "mzdy".zz_rzdane (rok, os_cislo, poradi);
{ TABLE "mzdy".zz_stred row size = 0 number of columns = 21 index size = 0 }
{ unload file name = zz_stred.unl number of rows = 9 }
create table "mzdy".zz_stred 
  (
    str char(10) not null,
    nazev char(80) not null,
    nazev2 char(80),
    cis_divize integer,
    skup_str integer,
    celk_castka decimal(16,2),
    cerp_castka decimal(16,2),
    plan_brut decimal(16,2),
    brutto decimal(16,2),
    pobocka integer,
    priznaky char(10),
    typ char(1),
    plati_od date,
    plati_do date,
    cena_nizsi decimal(16,2),
    cena_vyssi decimal(16,2),
    id_str integer,
    id_podniku integer not null,
    id_projektu integer,
    id_zakazky integer,
    generovat_rezii integer
  );
revoke all on "mzdy".zz_stred from "public";

create unique  index "mzdy".zz_ix_str_idpstr10 on "mzdy".zz_stred (id_podniku, str);
create  index "mzdy".zz_ix_stred_110 on "mzdy".zz_stred (skup_str, id_podniku);
{ TABLE "mzdy".zz_prac_pom row size = 0 number of columns = 136 index size = 0 }
{ unload file name = zz_prac_pom.unl number of rows = 1184 }
create table "mzdy".zz_prac_pom 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    druh_pom char(1) not null,
    doba_uvazku char(1) not null,
    prac_str char(10) not null,
    skup_prac char(7),
    prac_kateg integer,
    jkz integer,
    pov_funkce char(12),
    mzd_stup integer,
    trida integer,
    typ_tt integer not null,
    zak_uvazek decimal(4,2) not null,
    hod_uvazek decimal(4,2) not null,
    smena integer,
    duvod_kratsi char(1),
    typ_kal integer not null,
    rozp_kateg char(3),
    vykaz char(3),
    rez_zakazka char(10),
    typ_mzdy integer not null,
    tarif decimal(16,2) not null,
    os_hodn decimal(16,2),
    tarif_cizi decimal(16,4),
    kurz_cizi decimal(16,4),
    pripl_vedeni decimal(16,2),
    pripl_zvlastni decimal(16,2),
    typ_premii integer,
    prem_cast decimal(16,2),
    odpr_pro_dov integer not null,
    neodpr_dny integer not null,
    ex_dov char(1),
    navaz_dov char(1),
    dov_narok decimal(3,1) not null,
    dov_cerpana decimal(5,2) not null,
    dov_kracena decimal(5,2) not null,
    dov_predmin decimal(5,2),
    zbyv_rd_min_rok decimal(5,2) not null,
    rd_letos decimal(5,2) not null,
    dov_dodatk_r decimal(5,2),
    dov_dodatk decimal(5,2),
    trv_dov char(1) not null,
    trv_nem char(1) not null,
    dny_ro_dov decimal(5,1) not null,
    hod_ro_dov decimal(7,2) not null,
    kcs_dov decimal(16,2) not null,
    kcs_dov_1 decimal(16,2) not null,
    kcs_dov_2 decimal(16,2) not null,
    kcs_dov_3 decimal(16,2) not null,
    kcs_dov_4 decimal(16,2) not null,
    prum_dov decimal(16,2),
    min_prum_dov decimal(16,2),
    dny_ro_nem decimal(6,1) not null,
    kcs_nem decimal(16,2) not null,
    prum_nem decimal(16,2),
    min_prum_nem decimal(16,2),
    dny_nemoci integer not null,
    praxe integer,
    praxe_dny integer,
    min_zakl decimal(16,2),
    min_pripl decimal(16,2),
    min_uvazek decimal(4,2),
    min_min_mzda decimal(16,2),
    potl_min_mzdy char(1),
    datum_nastupu date not null,
    duvod_nast char(3),
    datum_zmeny date,
    datum_ukonc date,
    duvod_ukonc char(3),
    zac_nem_poj date,
    eldp_1znak char(1),
    eldp_3znak char(1),
    eldp_akt char(1),
    eldp_nezahrn char(1),
    druh_pom_j char(2),
    zk_doba date,
    kl_po_zam char(4),
    zap_praxe char(8),
    zap_praxe_od date,
    zvys_ps_mes integer,
    zvys_ps_rok integer,
    zvys_ps_dat date,
    id_pracmist integer,
    id_pracmist_2 integer,
    datum_pr_sml date,
    datum_plan_odch date,
    datum_skut_nast date,
    premie_proc_ind decimal(5,2),
    dov_generovat char(1),
    dov_kratit char(1),
    doplnkova_1 char(50),
    doplnkova_2 date,
    cislo_platvym integer,
    cislo_dodatsml integer,
    nahr_hod_uvazek decimal(4,2),
    nahr_typ_kal integer,
    nahr_smena integer,
    jen_duchpoj char(1),
    maly_rozsah char(1),
    dat_doruc_vypov date,
    ucast_duchp_od date,
    misto_vykonu char(50),
    kpd_od date,
    kpd_do date,
    kpd_prum decimal(16,4),
    prum_rok decimal(16,4),
    vychozi_pomer integer,
    c_kmen_pom integer,
    isco08 char(7),
    ind_dn_sk char(1),
    zpusob_ukonc char(7),
    model_pd char(10),
    doch_karta char(15),
    mespr_vypl_nepr char(1),
    id_rez_projekt integer,
    tyd_prac_doba char(1),
    smluv_pom_uv decimal(6,4),
    mes_pom_uv decimal(6,4),
    prum_pom_uv decimal(6,4),
    cislo_sluz_oznac char(3),
    mesice_pracurad integer,
    eldp_vyd_cin_od date,
    legislat_uvazek decimal(4,2),
    id_agentury integer,
    vynimka char(1),
    zpracov_mzdy char(7),
    zpracov_pers char(7),
    mena_cizi char(3),
    ic_prav_vztahu char(15),
    doplnkova_3 char(10),
    odvod_odp_pol_od date,
    odvod_odp_pol_do date,
    naroc_prof_produch char(1),
    garance_castka decimal(16,2),
    homeof_typ_kal integer,
    homeof_smena integer
  );
revoke all on "mzdy".zz_prac_pom from "public";

create  index "mzdy".zz_ix_pom10 on "mzdy".zz_prac_pom (os_cislo);
create unique  index "mzdy".zz_ix_pom210 on "mzdy".zz_prac_pom (os_cislo, cislo_pom);
create  index "mzdy".zz_ix_pom310 on "mzdy".zz_prac_pom (os_cislo, datum_nastupu, datum_ukonc);
create  index "mzdy".zz_ix_pom410 on "mzdy".zz_prac_pom (datum_nastupu);
create  index "mzdy".zz_ix_pom510 on "mzdy".zz_prac_pom (datum_ukonc);
{ TABLE "mzdy".zz_prac_pom_po row size = 0 number of columns = 7 index size = 0 }
{ unload file name = zz_prac_pom_po.unl number of rows = 887 }
create table "mzdy".zz_prac_pom_po 
  (
    os_cislo decimal(10,0) not null,
    cislo_pom integer not null,
    polozka char(20),
    hodnota char(80),
    datum_od date,
    datum_do date,
    skupina char(20)
  );
revoke all on "mzdy".zz_prac_pom_po from "public";

create  index "mzdy".zz_ix_pom_po110 on "mzdy".zz_prac_pom_po (os_cislo, cislo_pom, polozka);
{ TABLE "mzdy".zpr_sablony row size = 0 number of columns = 9 index size = 0 }
{ unload file name = zpr_sablony.unl number of rows = 0 }
create table "mzdy".zpr_sablony 
  (
    id integer not null,
    id_notif integer not null,
    id_podniku integer,
    sablona integer not null,
    sql_data integer,
    var_data integer,
    popis char(150) not null,
    formou_emailu char(1) not null,
    prijemci_vztah integer not null
  );
revoke all on "mzdy".zpr_sablony from "public";

{ TABLE "mzdy".zpravy row size = 0 number of columns = 32 index size = 0 }
{ unload file name = zpravy.unl number of rows = 4509 }
create table "mzdy".zpravy 
  (
    id integer not null,
    re_id integer,
    notif_id integer,
    typ integer not null,
    odesilatel decimal(10,0),
    adresa char(80),
    predmet char(80),
    telo integer,
    id_pozadavku integer,
    sablona_email char(1),
    sablona integer,
    xml integer,
    kodovani char(20),
    datum_od date,
    datum_do date,
    cas_od char(6),
    cas_do char(6),
    priorita integer,
    stav integer not null,
    pokus integer not null,
    storno integer not null,
    vlozeno char(17) not null,
    nedoruceno char(17),
    odeslano char(17),
    doruceno char(17),
    grupa integer,
    crypto integer not null,
    cert_name char(50),
    cert_typ integer,
    heslo char(64),
    chyba char(250),
    info char(250)
  );
revoke all on "mzdy".zpravy from "public";

create  index "mzdy".ix_zpravy on "mzdy".zpravy (notif_id, stav);
create  index "mzdy".ix_zpravy1 on "mzdy".zpravy (typ, adresa, storno, stav);
{ TABLE "mzdy".zz_platby row size = 0 number of columns = 49 index size = 0 }
{ unload file name = zz_platby.unl number of rows = 2536 }
create table "mzdy".zz_platby 
  (
    id integer not null,
    os_cislo decimal(10,0) not null,
    kod integer not null,
    c_dokladu integer not null,
    celk_castka decimal(16,2),
    zbyv_castka decimal(16,2),
    mes_castka decimal(16,2) not null,
    prech_castka decimal(16,2),
    mimor_splatka decimal(16,2),
    deponovat char(1),
    poradi integer not null,
    cislo_platby char(20),
    konst_symb char(4),
    var_symb char(10),
    spec_symb char(10),
    cislo_banky char(4),
    swift char(11),
    iban char(28),
    bank_spoj_odkud integer,
    jmeno_prij char(30),
    ulice char(45),
    misto char(48),
    psc char(5),
    spec_adresata char(10),
    ev_cislo char(100),
    poznamka char(35),
    opr_jmeno char(150),
    opr_ulice char(45),
    opr_cislo char(14),
    opr_misto char(48),
    opr_psc char(5),
    deti char(250),
    dat_doruc date,
    dat_prmoc date,
    eu_jmeno char(150),
    eu_ulice char(45),
    eu_cislo char(14),
    eu_misto char(48),
    eu_psc char(5),
    dep_odeslano date,
    dep_zaplaceno char(1),
    nahrada_zam char(1),
    dat_od date not null,
    dat_do date,
    vyp_procento decimal(3,1),
    srazit_dpp char(1),
    vychozi_ucet char(1),
    nezahrn_4exe char(1),
    svazane_c_dokl integer
  );
revoke all on "mzdy".zz_platby from "public";

create unique  index "mzdy".zz_ix_platby_id10 on "mzdy".zz_platby (id);
create  index "mzdy".zz_ix_platby_os_ci on "mzdy".zz_platby (os_cislo, dat_od);
create  index "mzdy".zz_ix_platby_c_dok on "mzdy".zz_platby (c_dokladu, dat_od);
{ TABLE "mzdy".dch_sumace row size = 0 number of columns = 10 index size = 0 }
{ unload file name = dch_sumace.unl number of rows = 142158 }
create table "mzdy".dch_sumace 
  (
    os_cislo decimal(10,0),
    cislo_pom integer,
    prac_str char(12),
    kod integer,
    castka decimal(10,4),
    dat_od date,
    dat_do date,
    dny decimal(3,1),
    hodiny decimal(5,2),
    datum date
  );
revoke all on "mzdy".dch_sumace from "public";

create  index "mzdy".ix_dchsum on "mzdy".dch_sumace (os_cislo, cislo_pom, datum);
create  index "mzdy".ix_dchsum_kod on "mzdy".dch_sumace (kod, datum);
{ MAP: Export trval 00:06:08 }

