
DO $$ 
    BEGIN
          IF EXISTS (SELECT "Id" FROM public."Versions" WHERE "Build">=1765) THEN
		RETURN;
          END IF;
        BEGIN
        CREATE TABLE public."ExportedDirectories" ( 
    "FromId" bigint NOT NULL,
    "ToId" bigint NOT NULL,   
    "Timestamp" timestamp without time zone DEFAULT timezone('utc', now())  NOT NULL,
    PRIMARY KEY ("FromId", "ToId")
);
        EXCEPTION
            WHEN duplicate_table THEN RAISE NOTICE 'Create table <ExportedDirectories>.';
        END;
    END;
$$
