#[ ZACATEK SOUBORU ]#

#DEF <SCHEMA>    food600
#DEF <PRIMARYKEY> idr
#DEF <TABLENAME> pomocna

#[ CREATE TABLE ZACATEK ]#
    c_karty integer NOT NULL DEFAULT 0,
    c_stredisk integer,
    zustatek numeric(20,10),
    cena_prum numeric(20,10),
    min_zaso numeric(20,10),
    c_mena smallint,
    c_data smallint NOT NULL DEFAULT 1,
    menostlp character(10) COLLATE pg_catalog."default",
    idr SERIAL,
    CONSTRAINT pomocna_<PRIMARYKEY> PRIMARY KEY (<PRIMARYKEY>)
#[ CREATE TABLE KONEC ]#

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

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

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

DROP INDEX IF EXISTS <SCHEMA>.pomocna_c_stredisk;
CREATE INDEX pomocna_c_stredisk
    ON <SCHEMA>.pomocna USING btree
    (c_stredisk ASC NULLS LAST)
    TABLESPACE pg_default;

DROP INDEX IF EXISTS <SCHEMA>.pomocna_menostlp;
CREATE INDEX pomocna_menostlp
    ON <SCHEMA>.pomocna USING btree
    (menostlp COLLATE pg_catalog."default" ASC NULLS LAST)
    TABLESPACE pg_default;
END IF;

#[ KONEC SOUBORU ]#