#[ ZACATEK SOUBORU ]#

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

#[ CREATE TABLE ZACATEK ]#
    c_druh integer NOT NULL DEFAULT 0,
    id_hores integer NOT NULL DEFAULT 0,
    id1 integer NOT NULL DEFAULT 0,
    id2 integer NOT NULL DEFAULT 0,
    id3 integer NOT NULL DEFAULT 0,
    id4 integer NOT NULL DEFAULT 0,
    id5 integer NOT NULL DEFAULT 0,
    id6 integer NOT NULL DEFAULT 0,
    id7 integer NOT NULL DEFAULT 0,
    id8 integer NOT NULL DEFAULT 0,
    id9 integer NOT NULL DEFAULT 0,
    kdo character(3) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    tmatr character(1) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    c_data smallint NOT NULL DEFAULT 1,
    idriadok SERIAL,
    id_kas character(2) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    kdy character(17) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    CONSTRAINT h10_set_idriadok PRIMARY KEY (idriadok)
#[ CREATE TABLE KONEC ]#

#[ IF EXIST ZACATEK ]#
#[ PRIMARYKEY ]#
	IF NOT EXISTS (SELECT column_name FROM information_schema.columns WHERE table_schema='<SCHEMA>' and table_name='h10_set' and column_name='budova') THEN
		ALTER TABLE <SCHEMA>.h10_set ADD COLUMN budova character(30) NOT NULL DEFAULT '';
	END IF;
END IF;

#[ KONEC SOUBORU ]#