#[ ZACATEK SOUBORU ]#

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

#[ CREATE TABLE ZACATEK ]#
    c_dokl integer NOT NULL DEFAULT 0,
    operace character(2) COLLATE pg_catalog."default" NOT NULL DEFAULT 'VK'::bpchar,
    c_karty integer NOT NULL DEFAULT 0,
    mnozstvi numeric(20,10) NOT NULL DEFAULT 0,
    c_stredisk integer NOT NULL DEFAULT 0,
    provedl character(3) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    kdy timestamp without time zone,
    c_data smallint NOT NULL DEFAULT 1,
    idriadok SERIAL,
    stornovano smallint DEFAULT 0,
    label smallint DEFAULT 0,
    CONSTRAINT <TABLENAME>_<PRIMARYKEY> PRIMARY KEY (idriadok)
#[ CREATE TABLE KONEC ]#

#[ IF EXIST ZACATEK ]#
#[ PRIMARYKEY ]#

	DELETE FROM <SCHEMA>.<TABLENAME> WHERE  kdy < NOW() - '444 days'::interval ;


END IF;
#[ KONEC SOUBORU ]#