#[ ZACATEK SOUBORU ]#

#DEF <SCHEMA>    food600
#DEF <PRIMARYKEY> idriadok
#DEF <TABLENAME> sk_sez

#[ CREATE TABLE ZACATEK ]#
    id_kas character(2) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    id_man character(2) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    uzaverka character(17) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    autor character(3) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    odecteno character(17) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    label character(1) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    priznak character(20) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    c_mena smallint NOT NULL DEFAULT 1,
    uct_den date,
    lastuzav character(17) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    c_data smallint NOT NULL DEFAULT 1,
    idriadok SERIAL,
    uctexport smallint NOT NULL DEFAULT 0,
    fuzcislo integer NOT NULL DEFAULT 0,
    fuzdate date,
    fuzav smallint NOT NULL DEFAULT 0,
    u_cis character(7) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    ducis character(4) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    uz_cislo numeric(4,0) NOT NULL DEFAULT 1,
    CONSTRAINT sk_sez_uzav UNIQUE (id_kas, id_man, uzaverka),
    CONSTRAINT <TABLENAME>_<PRIMARYKEY> PRIMARY KEY (<PRIMARYKEY>)
#[ CREATE TABLE KONEC ]#

#[ IF EXIST ZACATEK ]#
#[ PRIMARYKEY ]#
END IF;

#[ KONEC SOUBORU ]#