#[ ZACATEK SOUBORU ]#

#DEF <SCHEMA>    food600
#DEF <PRIMARYKEY> subor
#DEF <TABLENAME> stavprepoctu

#[ CREATE TABLE ZACATEK ]#
    c_data smallint NOT NULL DEFAULT 1,
    subor character(10) COLLATE pg_catalog."default" NOT NULL DEFAULT '""'::bpchar,
    od_dokladu integer NOT NULL DEFAULT (0)::integer,
    po_doklad integer NOT NULL DEFAULT (0)::integer,
    riadkov integer NOT NULL DEFAULT (0)::integer,
    aktualnydoklad integer NOT NULL DEFAULT (0)::integer,
    aktualne integer NOT NULL DEFAULT (0)::integer,
    sprava character(50) COLLATE pg_catalog."default",
    vazba character(10) COLLATE pg_catalog."default",
    CONSTRAINT stavprepoctu_pkey PRIMARY KEY (<PRIMARYKEY>)
#[ CREATE TABLE KONEC ]#

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

	ALTER TABLE <SCHEMA>.stavprepoctu  ALTER COLUMN c_data SET DEFAULT 1;


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

 END IF;
#[ KONEC SOUBORU ]#