#[ ZACATEK SOUBORU ]#

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

#[ CREATE TABLE ZACATEK ]#
    c_karty integer NOT NULL DEFAULT 0,
    c_stredisk integer NOT NULL DEFAULT 0,
    mnozstvi numeric(20,10) NOT NULL DEFAULT 0,
    na_sklade numeric(20,10) NOT NULL DEFAULT 0,
    idriadok SERIAL,
    c_data smallint NOT NULL DEFAULT 1,
    kdy timestamp without time zone NOT NULL DEFAULT now(),
    CONSTRAINT <TABLENAME>_<PRIMARYKEY> PRIMARY KEY (idriadok)
#[ CREATE TABLE KONEC ]#

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

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

END IF;

#[ KONEC SOUBORU ]#