#[ ZACATEK SOUBORU ]#

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

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

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

	TRUNCATE TABLE <SCHEMA>.<TABLENAME> ;

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

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

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

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

 END IF;
#[ KONEC SOUBORU ]#