#[ ZACATEK SOUBORU ]#

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

#[ CREATE TABLE ZACATEK ]#
    menobuf character(10) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    idriadok SERIAL,
    c_data smallint NOT NULL DEFAULT 1,
    c_karty integer NOT NULL DEFAULT 0,
    hruba numeric(20,10) NOT NULL DEFAULT 0,
    c_poloz integer NOT NULL DEFAULT 0,
    mnozstvi numeric(20,10) NOT NULL DEFAULT 0,
    o_c_karty numeric(20,10) NOT NULL DEFAULT 0,
    cista numeric(20,10) NOT NULL DEFAULT 0,
    CONSTRAINT <TABLENAME>_<PRIMARYKEY> PRIMARY KEY (idriadok)
#[ CREATE TABLE KONEC ]#

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

DROP INDEX IF EXISTS <SCHEMA>.odpocet_kalk_c_data;
CREATE INDEX odpocet_kalk_c_data
    ON <SCHEMA>.odpocet_kalk USING btree
    (c_data ASC NULLS LAST)
    TABLESPACE pg_default;

DROP INDEX IF EXISTS <SCHEMA>.odpocet_kalk_menobuf;
CREATE INDEX odpocet_kalk_menobuf
    ON <SCHEMA>.odpocet_kalk USING btree
    (menobuf COLLATE pg_catalog."default" ASC NULLS LAST)
    TABLESPACE pg_default;

END IF;


#[ KONEC SOUBORU ]#