From 5fe9763763fa62ad00d70028f5abf000bd1c111c Mon Sep 17 00:00:00 2001
From: michaelschal <35957947-michaelschal@users.noreply.replit.com>
Date: Tue, 12 Aug 2025 08:42:58 +0000
Subject: [PATCH] Allow users to download the database schema report
Add a new endpoint to download the database schema, and include a download button on the debug page.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: b163d4c0-de5e-4f4e-a9c0-aed4c7049718
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/b163d4c0-de5e-4f4e-a9c0-aed4c7049718/i9LQiyj
---
client/src/pages/DatabaseDebug.tsx | 50 ++++++----
server/routes.ts | 150 ++++++++++++++++++++++++++++-
2 files changed, 178 insertions(+), 22 deletions(-)
diff --git a/client/src/pages/DatabaseDebug.tsx b/client/src/pages/DatabaseDebug.tsx
index 224d098..21a9376 100644
--- a/client/src/pages/DatabaseDebug.tsx
+++ b/client/src/pages/DatabaseDebug.tsx
@@ -1,7 +1,7 @@
import { useState } from "react";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
-import { Database, Eye, Loader2 } from "lucide-react";
+import { Database, Eye, Loader2, Download } from "lucide-react";
import { useAuthUnified } from "@/hooks/useAuthUnified";
export default function DatabaseDebug() {
@@ -82,23 +82,36 @@ export default function DatabaseDebug() {
-