#[ ZACATEK SOUBORU ]#

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

#[ CREATE TABLE ZACATEK ]#
    idriadok SERIAL,
    mssg character varying(252) COLLATE pg_catalog."default",
    line_txt character varying(252) COLLATE pg_catalog."default",
    prog_chain character varying(252) COLLATE pg_catalog."default",
    prg character varying(252) COLLATE pg_catalog."default",
    otevreno character varying(252) COLLATE pg_catalog."default",
    err_h_info character varying(252) COLLATE pg_catalog."default",
    machine character varying(44) COLLATE pg_catalog."default",
    kdo character varying(44) COLLATE pg_catalog."default",
    cas timestamp without time zone DEFAULT now(),
    CONSTRAINT errors_pkey PRIMARY KEY (idriadok)
#[ CREATE TABLE KONEC ]#

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


	ALTER TABLE <SCHEMA>.errors   ALTER COLUMN mssg TYPE character varying (252) COLLATE pg_catalog."default";
	ALTER TABLE <SCHEMA>.errors   ALTER COLUMN line_txt TYPE character varying (252) COLLATE pg_catalog."default";
	ALTER TABLE <SCHEMA>.errors   ALTER COLUMN prog_chain TYPE character varying (252) COLLATE pg_catalog."default";
	ALTER TABLE <SCHEMA>.errors   ALTER COLUMN prg TYPE character varying (252) COLLATE pg_catalog."default";
	ALTER TABLE <SCHEMA>.errors   ALTER COLUMN otevreno TYPE character varying (252) COLLATE pg_catalog."default";
	ALTER TABLE <SCHEMA>.errors   ALTER COLUMN err_h_info TYPE character varying (252) COLLATE pg_catalog."default";
	ALTER TABLE <SCHEMA>.errors   ALTER COLUMN machine TYPE character varying (44) COLLATE pg_catalog."default";
	ALTER TABLE <SCHEMA>.errors   ALTER COLUMN kdo TYPE character varying (44) COLLATE pg_catalog."default";

 END IF;

#[ KONEC SOUBORU ]#