----    slovenskaverzia=.T.       ----


#[ ZACATEK SOUBORU ]#

#DEF <SCHEMA>    food600
#DEF <PRIMARYKEY> id
#DEF <TABLENAME> sk_odpocty

#[ CREATE TABLE ZACATEK ]#
    id SERIAL,
    sk_closing_key integer,
    c_stredisk integer,
    c_data smallint NOT NULL DEFAULT 1,
    odecteno boolean NOT NULL DEFAULT (0)::boolean,
    CONSTRAINT sk_odpocty_id PRIMARY KEY (<PRIMARYKEY>),
    CONSTRAINT sk_odpocty_closing FOREIGN KEY (sk_closing_key)
        REFERENCES <SCHEMA>.sk_closings (id) MATCH SIMPLE
        ON UPDATE CASCADE
        ON DELETE CASCADE
#[ CREATE TABLE KONEC ]#

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

DROP INDEX IF EXISTS <SCHEMA>.fki_sk_odpocty_closing;
CREATE INDEX fki_sk_odpocty_closing
    ON <SCHEMA>.sk_odpocty USING btree
    (sk_closing_key ASC NULLS LAST)
    TABLESPACE pg_default;
 
 
 END IF;
#[ KONEC SOUBORU ]#