-- vazba contract_item na sameho seba pre ucely oznacenia ze polozka
-- je v balicku a nema byt billovana jednotlivo, ale v ramci svojho balicka

ALTER TABLE contract_item ADD PRIMARY KEY (id);
ALTER TABLE contract_item ADD COLUMN contract_item_pack INT REFERENCES contract_item (id) ON UPDATE CASCADE ON DELETE RESTRICT;
CREATE INDEX contract_item_contract_item_pack ON contract_item (contract_item_pack);
