DO $$
	BEGIN
		IF EXISTS (SELECT "Id" FROM public."Versions" WHERE "Build">=3287) THEN
			RETURN;
	END IF;

	BEGIN

		ALTER TABLE public."EventDetails" ADD "Sequence" int DEFAULT 0 NOT NULL;
		ALTER TABLE public."EventExceptions" ADD "Sequence" int DEFAULT 0 NOT NULL;

		EXCEPTION
			WHEN OTHERS THEN RAISE NOTICE 'Add column Sequence to tables EventsDetails, EventsExceptions error.';
		END;
	END;
$$



