CREATE TABLE "pcr_pr_attachment" ( "id" serial PRIMARY KEY NOT NULL, "pcr_pr_id" integer NOT NULL, "type" varchar(20) NOT NULL, "file_name" varchar(255) NOT NULL, "file_path" text NOT NULL, "file_size" integer, "mime_type" varchar(100), "created_by" integer, "created_at" timestamp DEFAULT now() NOT NULL, "updated_by" integer, "updated_at" timestamp DEFAULT now() NOT NULL ); --> statement-breakpoint ALTER TABLE "pcr_pr_attachment" ADD CONSTRAINT "pcr_pr_attachment_pcr_pr_id_pcr_pr_id_fk" FOREIGN KEY ("pcr_pr_id") REFERENCES "public"."pcr_pr"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "pcr_pr_attachment" ADD CONSTRAINT "pcr_pr_attachment_created_by_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "pcr_pr_attachment" ADD CONSTRAINT "pcr_pr_attachment_updated_by_users_id_fk" FOREIGN KEY ("updated_by") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;