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


#[ ZACATEK SOUBORU ]#

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

#[ CREATE TABLE ZACATEK ]#
    id SERIAL,
    id_old integer,
    c_kas integer NOT NULL,
    sk_closing_key integer,
    c_uctu integer NOT NULL,
    u_cis character(1) COLLATE pg_catalog."default",
    autor character(3) COLLATE pg_catalog."default",
    typ character(1) COLLATE pg_catalog."default" NOT NULL DEFAULT 'U'::bpchar,
    refer_key integer,
    order_key integer,
    cas_konce timestamp without time zone NOT NULL DEFAULT now(),
    mutace character(1) COLLATE pg_catalog."default",
    cas_atrib character(1) COLLATE pg_catalog."default",
    pocethostu integer,
    stul numeric(8,1),
    info_text character(1) COLLATE pg_catalog."default",
    info_json json,
    lim_datum date,
    id_limit integer,
    id_den integer,
    id_chod integer,
    round50 numeric(4,2),
    fucis integer,
    fuciarkod character(20) COLLATE pg_catalog."default",
    c_data smallint NOT NULL DEFAULT 1,
    cas_pocatku timestamp with time zone NOT NULL DEFAULT now(),
    CONSTRAINT sk_headers_pkey PRIMARY KEY (<PRIMARYKEY>),
    CONSTRAINT sk_headers_refer_key_fkey FOREIGN KEY (refer_key)
        REFERENCES <SCHEMA>.sk_headers (id) MATCH SIMPLE
        ON UPDATE CASCADE
        ON DELETE NO ACTION,
    CONSTRAINT sk_headers_sk_closing_key_fkey FOREIGN KEY (sk_closing_key)
        REFERENCES <SCHEMA>.sk_closings (id) MATCH SIMPLE
        ON UPDATE CASCADE
        ON DELETE SET NULL
#[ CREATE TABLE KONEC ]#

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