From 8040238ea5067a0de089104e7a7eca71d262b9cc Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Wed, 24 Jun 2026 01:03:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4timestamp=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E7=9A=84=E6=98=BE=E5=BC=8Fdefault=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DDL生成器会自动为timestamp类型添加DEFAULT CURRENT_TIMESTAMP, 显式指定会导致重复DEFAULT声明,MySQL报错1067。 修复的表: - discount_marketing (created_at, updated_at) - discount_promo_code (created_at) - discount_customer_bind (created_at) --- models/discount_customer_bind.json | 1 - models/discount_marketing.json | 2 -- models/discount_promo_code.json | 1 - 3 files changed, 4 deletions(-) diff --git a/models/discount_customer_bind.json b/models/discount_customer_bind.json index 8b34ce8..5a15a00 100644 --- a/models/discount_customer_bind.json +++ b/models/discount_customer_bind.json @@ -54,7 +54,6 @@ "name": "created_at", "title": "绑定时间", "type": "timestamp", - "default": "CURRENT_TIMESTAMP", "nullable": "no" } ], diff --git a/models/discount_marketing.json b/models/discount_marketing.json index 115203a..8da00f9 100644 --- a/models/discount_marketing.json +++ b/models/discount_marketing.json @@ -56,14 +56,12 @@ "name": "created_at", "title": "创建时间", "type": "timestamp", - "default": "CURRENT_TIMESTAMP", "nullable": "no" }, { "name": "updated_at", "title": "更新时间", "type": "timestamp", - "default": "CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP", "nullable": "no" } ], diff --git a/models/discount_promo_code.json b/models/discount_promo_code.json index d5a33b0..37270f4 100644 --- a/models/discount_promo_code.json +++ b/models/discount_promo_code.json @@ -54,7 +54,6 @@ "name": "created_at", "title": "生成时间", "type": "timestamp", - "default": "CURRENT_TIMESTAMP", "nullable": "no" } ],