From ef4c533ebacc2cdc97e518f30e9a9350004fcdfb Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Mon, 28 Apr 2025 02:13:30 +0000
Subject: ~20250428 작업사항
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 db/migrations/0027_stiff_shadowcat.sql | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 db/migrations/0027_stiff_shadowcat.sql

(limited to 'db/migrations/0027_stiff_shadowcat.sql')

diff --git a/db/migrations/0027_stiff_shadowcat.sql b/db/migrations/0027_stiff_shadowcat.sql
new file mode 100644
index 00000000..6277799e
--- /dev/null
+++ b/db/migrations/0027_stiff_shadowcat.sql
@@ -0,0 +1,13 @@
+CREATE TABLE "vendors_logs" (
+	"id" serial PRIMARY KEY NOT NULL,
+	"vendor_id" integer NOT NULL,
+	"user_id" integer NOT NULL,
+	"action" varchar(100) NOT NULL,
+	"old_status" varchar(30),
+	"new_status" varchar(30),
+	"comment" text,
+	"created_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "vendors_logs" ADD CONSTRAINT "vendors_logs_vendor_id_vendors_id_fk" FOREIGN KEY ("vendor_id") REFERENCES "public"."vendors"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "vendors_logs" ADD CONSTRAINT "vendors_logs_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
-- 
cgit v1.2.3

