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

	BEGIN

		BEGIN
		ALTER TABLE public."Projects" ADD "Flags" integer NULL DEFAULT 0;

		EXCEPTION WHEN OTHERS THEN
			NULL;
		END;

		ALTER TABLE public."ProjectSprints" ADD "Flags" integer NULL DEFAULT 0;
		INSERT INTO public."Versions" ("Path", "Build") VALUES (_path, 0);

		EXCEPTION
			WHEN OTHERS THEN RAISE NOTICE 'Add Flags to table ProjectSprints error.';
		END;
	END;
$$



