DO $$ BEGIN
 CREATE TYPE "document_type" AS ENUM('EPR', 'Condition Report', 'Evidence Report', 'Summary Information', 'Floor Plan', 'Scenario EPR');
EXCEPTION
 WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "energy_assessment_documents" (
	"id" bigserial PRIMARY KEY NOT NULL,
	"uprn" bigint NOT NULL,
	"energy_assessment_id" bigint NOT NULL,
	"document_type" "document_type" NOT NULL,
	"document_location" text NOT NULL,
	"uploaded_at" timestamp (6) with time zone DEFAULT now() NOT NULL
);
