#[ ZACATEK SOUBORU ]#

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

#[ CREATE TABLE ZACATEK ]#
    u_cis character varying(7) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::character varying,
    uzaverka character varying(17) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::character varying,
    id_kas character(2) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    druh_pl character varying(7) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::character varying,
    castka numeric(12,2) NOT NULL DEFAULT 0,
    md character varying(8) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::character varying,
    dal character varying(8) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::character varying,
    md2 character varying(7) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::character varying,
    dal2 character varying(7) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::character varying,
    hs_md character varying(15) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::character varying,
    hs_dal character varying(15) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::character varying,
    datum_dokl date,
    pz character varying(50) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::character varying,
    poznamka character varying(50) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::character varying,
    zaloha smallint NOT NULL DEFAULT 0,
    faktura character varying(10) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::character varying,
    idriadok SERIAL,
    rok character(4) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    mesiac character(2) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    c_data smallint NOT NULL DEFAULT 1,
    partner character varying(30) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    CONSTRAINT uexarchplatby_idriadok PRIMARY KEY (<PRIMARYKEY>)
#[ CREATE TABLE KONEC ]#

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

	ALTER TABLE <SCHEMA>.uexarchplatby  ALTER COLUMN md2  TYPE character(15) COLLATE pg_catalog."default";
	ALTER TABLE <SCHEMA>.uexarchplatby  ALTER COLUMN dal2 TYPE character(15) COLLATE pg_catalog."default";

 END IF;

#[ KONEC SOUBORU ]#