From 96eef805a3727639794ea90bfa82b3883f9f3d9c Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期六, 31 五月 2025 10:48:45 +0800
Subject: [PATCH] 省市区处理

---
 ruoyi-system/src/main/resources/db/migration/postgresql/V20250531102500__create_district.sql |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/ruoyi-system/src/main/resources/db/migration/postgresql/V20250531102500__create_district.sql b/ruoyi-system/src/main/resources/db/migration/postgresql/V20250531102500__create_district.sql
new file mode 100644
index 0000000..75414aa
--- /dev/null
+++ b/ruoyi-system/src/main/resources/db/migration/postgresql/V20250531102500__create_district.sql
@@ -0,0 +1,17 @@
+DROP TABLE IF EXISTS district;
+
+CREATE TABLE district
+(
+    id          bigserial PRIMARY KEY,
+    create_time timestamp with time zone NOT NULL,
+    update_time timestamp with time zone NOT NULL,
+    name        varchar(100) DEFAULT ''  NOT NULL,
+    city_id     bigint       DEFAULT 0   NOT NULL
+);
+
+COMMENT ON TABLE district IS '鍖鸿〃';
+
+COMMENT ON COLUMN district.name IS '鍚嶇О';
+COMMENT ON COLUMN district.city_id IS '鍩庡競id';
+
+create unique index on district (name, city_id);

--
Gitblit v1.9.3