----    slovenskaverzia=.T.       ----


#[ ZACATEK SOUBORU ]#

#DEF <SCHEMA>    food600
#DEF <PRIMARYKEY> id
#DEF <TABLENAME> sk_items

#[ CREATE TABLE ZACATEK ]#
    id SERIAL,
    sk_header_key integer NOT NULL,
    order_item_key integer,
    c_stredisk integer NOT NULL,
    c_karty integer NOT NULL DEFAULT 0,
    prachy numeric(12,2) NOT NULL,
    prachy_puv numeric(12,2) NOT NULL,
    dan numeric(12,2) NOT NULL,
    dan_sazba numeric(4,2) NOT NULL,
    mnozstvi numeric(12,3) NOT NULL,
    stor_mno numeric(12,3),
    cen_hlad smallint NOT NULL DEFAULT 1,
    k_odpoctu character(1) COLLATE pg_catalog."default",
    poradi smallint NOT NULL DEFAULT 1,
    dotacia character(1) COLLATE pg_catalog."default",
    dil_porce smallint NOT NULL DEFAULT 1,
    id_fmenu character(7) COLLATE pg_catalog."default",
    kompez smallint,
    jedn_cena numeric(12,2) NOT NULL DEFAULT 0,
    CONSTRAINT sk_items_pkey PRIMARY KEY (<PRIMARYKEY>),

    CONSTRAINT sk_items_sk_header_key_fkey FOREIGN KEY (sk_header_key)
        REFERENCES <SCHEMA>.sk_headers (id) MATCH SIMPLE
        ON UPDATE CASCADE
        ON DELETE CASCADE
#[ CREATE TABLE KONEC ]#

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