#[ ZACATEK SOUBORU ]#

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

#[ CREATE TABLE ZACATEK ]#
    menobuf character(10) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    idriadok SERIAL,
    k_odpoctu numeric(20,10) NOT NULL DEFAULT 0,
    zustatek numeric(20,10) NOT NULL DEFAULT 0,
    cena_prum numeric(20,10) NOT NULL DEFAULT 0,
    c_mena smallint NOT NULL DEFAULT 1,
    c_karty integer NOT NULL DEFAULT 0,
    c_data smallint NOT NULL DEFAULT 1,
    prepocet smallint NOT NULL DEFAULT 0,
    c_stredisk integer NOT NULL DEFAULT 0,
    CONSTRAINT <TABLENAME>_<PRIMARYKEY> PRIMARY KEY (<PRIMARYKEY>)
#[ CREATE TABLE KONEC ]#

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

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

DROP INDEX IF EXISTS <SCHEMA>.odpocet_askl_c_karty;
CREATE INDEX odpocet_askl_c_karty
    ON <SCHEMA>.odpocet_askl USING btree
    (c_karty ASC NULLS LAST)
    TABLESPACE pg_default;

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

END IF;

#[ KONEC SOUBORU ]#