From ebff8d7f0808f956d9d8a9d0d561e6e64b4b1d87 Mon Sep 17 00:00:00 2001 From: ymq Date: Wed, 26 Aug 2026 16:41:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(models):=20sub=5Fdistributors=20created=5Fa?= =?UTF-8?q?t/updated=5Fat=20=E5=8E=BB=E6=8E=89=E5=B8=A6=E5=BC=95=E5=8F=B7?= =?UTF-8?q?=E7=9A=84=20CURRENT=5FTIMESTAMP=20default?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit default: "CURRENT_TIMESTAMP" 让 json2ddl 生成 DEFAULT 'CURRENT_TIMESTAMP'(带引号), MySQL 报 Invalid default value for created_at,导致建表中断(11张表未建)。 --- models/sub_distributors.json | 40 +++++++++++++++++------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/models/sub_distributors.json b/models/sub_distributors.json index fdac8c2..08f149e 100644 --- a/models/sub_distributors.json +++ b/models/sub_distributors.json @@ -18,26 +18,26 @@ "nullable": "no" }, { - "name": "resellerid", - "title": "所属主分销商机构ID", - "type": "str", - "length": 32, - "nullable": "no" + "name": "resellerid", + "title": "所属主分销商机构ID", + "type": "str", + "length": 32, + "nullable": "no" }, { - "name": "sub_distributorid", - "title": "二级分销商机构ID", - "type": "str", - "length": 32, - "nullable": "no", - "default": "" + "name": "sub_distributorid", + "title": "二级分销商机构ID", + "type": "str", + "length": 32, + "nullable": "no", + "default": "" }, { - "name": "sub_dist_name", - "title": "二级分销商名称", - "type": "str", - "length": 255, - "nullable": "no" + "name": "sub_dist_name", + "title": "二级分销商名称", + "type": "str", + "length": 255, + "nullable": "no" }, { "name": "contact_person", @@ -111,14 +111,12 @@ "name": "created_at", "title": "创建时间", "type": "datetime", - "nullable": "no", - "default": "CURRENT_TIMESTAMP" + "nullable": "no" }, { "name": "updated_at", "title": "更新时间", - "type": "datetime", - "default": "CURRENT_TIMESTAMP" + "type": "datetime" } ], "indexes": [ @@ -166,4 +164,4 @@ "cond": "parentid='sub_distributor_status'" } ] -} \ No newline at end of file +}