#[ ZACATEK SOUBORU ]#

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

#[ CREATE TABLE ZACATEK ]#
    idriadok SERIAL,
    rk_sifr integer NOT NULL DEFAULT 0,
    nazev character(8) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    rk_meno character(41) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::bpchar,
    interna smallint NOT NULL DEFAULT 0,
    CONSTRAINT rkeeper_platby_<PRIMARYKEY> PRIMARY KEY (<PRIMARYKEY>)
#[ CREATE TABLE KONEC ]#

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

	IF  NOT EXISTS (SELECT column_name FROM information_schema.columns WHERE table_schema='<SCHEMA>' and table_name='rkeeper_platby' and column_name='interna') THEN
		ALTER TABLE <SCHEMA>.rkeeper_platby ADD COLUMN interna smallint NOT NULL DEFAULT 0;
	END IF;

END IF;


#[ KONEC SOUBORU ]#