#[ ZACATEK SOUBORU ]#

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

#[ CREATE TABLE ZACATEK ]#
    c_stredisk integer,
    c_karty integer NOT NULL DEFAULT 0,
    c_dokl integer,
    poradi integer,
    menostlp character(10) COLLATE pg_catalog."default",
    idriadok SERIAL,
    CONSTRAINT genstavq_idriadok PRIMARY KEY (idriadok)
#[ CREATE TABLE KONEC ]#

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

	TRUNCATE TABLE <SCHEMA>.<TABLENAME> ;

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

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

DROP INDEX IF EXISTS <SCHEMA>.genstavq_cdokl;
CREATE INDEX genstavq_cdokl
    ON <SCHEMA>.genstavq USING btree
    (c_dokl ASC NULLS LAST)
    TABLESPACE pg_default;

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

DROP INDEX IF EXISTS <SCHEMA>.genstavq_poradi;
CREATE INDEX genstavq_poradi
    ON <SCHEMA>.genstavq USING btree
    (poradi ASC NULLS LAST)
    TABLESPACE pg_default;
 END IF;

#[ KONEC SOUBORU ]#