---    Vytvorenie sekvencie PROTEL_INVOICE_NUMBER

DO
$$
BEGIN
IF  not EXISTS (SELECT sequence_name FROM information_schema.sequences WHERE sequence_schema='food600' and sequence_name='protel_invoice_number' ) THEN
	CREATE SEQUENCE food600.protel_invoice_number   INCREMENT 1   START 1   MINVALUE 1;
END IF;
END
$$
