summaryrefslogtreecommitdiff
path: root/db/migrations/0111_fancy_exiles.sql
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-10-13 19:00:34 +0900
committerjoonhoekim <26rote@gmail.com>2025-10-13 19:00:34 +0900
commitb7069eccf7d54a9bb51c244207110c75a1d55f33 (patch)
treeea19187c3a8f6dd7d5969bc42c547915bae69f92 /db/migrations/0111_fancy_exiles.sql
parent80e3d0befed487e0447bacffd76ed6539f01e992 (diff)
(김준회) migrations 기존 watched 파일 제거 (gitignore에 추가된 항목들)
Diffstat (limited to 'db/migrations/0111_fancy_exiles.sql')
-rw-r--r--db/migrations/0111_fancy_exiles.sql60
1 files changed, 0 insertions, 60 deletions
diff --git a/db/migrations/0111_fancy_exiles.sql b/db/migrations/0111_fancy_exiles.sql
deleted file mode 100644
index b523e0f5..00000000
--- a/db/migrations/0111_fancy_exiles.sql
+++ /dev/null
@@ -1,60 +0,0 @@
-CREATE TABLE "ocr_rotation_attempts" (
- "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
- "session_id" uuid NOT NULL,
- "rotation" integer NOT NULL,
- "confidence" numeric(5, 4),
- "tables_found" integer DEFAULT 0 NOT NULL,
- "text_quality" numeric(5, 4),
- "keyword_count" integer DEFAULT 0 NOT NULL,
- "score" numeric(5, 4),
- "extracted_rows_count" integer DEFAULT 0 NOT NULL,
- "created_at" timestamp DEFAULT now() NOT NULL
-);
---> statement-breakpoint
-CREATE TABLE "ocr_rows" (
- "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
- "table_id" uuid NOT NULL,
- "session_id" uuid NOT NULL,
- "row_index" integer NOT NULL,
- "no" varchar(50),
- "identification_no" varchar(100),
- "tag_no" varchar(100),
- "joint_no" varchar(100),
- "joint_type" varchar(100),
- "welding_date" varchar(50),
- "confidence" numeric(5, 4),
- "source_table" integer,
- "source_row" integer,
- "created_at" timestamp DEFAULT now() NOT NULL
-);
---> statement-breakpoint
-CREATE TABLE "ocr_sessions" (
- "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
- "file_name" varchar(255) NOT NULL,
- "file_size" integer NOT NULL,
- "file_type" varchar(50) NOT NULL,
- "processing_time" integer NOT NULL,
- "best_rotation" integer DEFAULT 0 NOT NULL,
- "total_tables" integer DEFAULT 0 NOT NULL,
- "total_rows" integer DEFAULT 0 NOT NULL,
- "image_enhanced" boolean DEFAULT false NOT NULL,
- "pdf_converted" boolean DEFAULT false NOT NULL,
- "success" boolean DEFAULT true NOT NULL,
- "error_message" text,
- "warnings" jsonb,
- "created_at" timestamp DEFAULT now() NOT NULL,
- "updated_at" timestamp DEFAULT now() NOT NULL
-);
---> statement-breakpoint
-CREATE TABLE "ocr_tables" (
- "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
- "session_id" uuid NOT NULL,
- "table_index" integer NOT NULL,
- "row_count" integer DEFAULT 0 NOT NULL,
- "created_at" timestamp DEFAULT now() NOT NULL
-);
---> statement-breakpoint
-ALTER TABLE "ocr_rotation_attempts" ADD CONSTRAINT "ocr_rotation_attempts_session_id_ocr_sessions_id_fk" FOREIGN KEY ("session_id") REFERENCES "public"."ocr_sessions"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "ocr_rows" ADD CONSTRAINT "ocr_rows_table_id_ocr_tables_id_fk" FOREIGN KEY ("table_id") REFERENCES "public"."ocr_tables"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "ocr_rows" ADD CONSTRAINT "ocr_rows_session_id_ocr_sessions_id_fk" FOREIGN KEY ("session_id") REFERENCES "public"."ocr_sessions"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "ocr_tables" ADD CONSTRAINT "ocr_tables_session_id_ocr_sessions_id_fk" FOREIGN KEY ("session_id") REFERENCES "public"."ocr_sessions"("id") ON DELETE cascade ON UPDATE no action; \ No newline at end of file