From c1a728c39142014a7771e8779e85b7a8943e5804 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sat, 17 Jan 2026 23:43:32 +0800 Subject: [PATCH] add default value for newly added columns --- pkg/models/transaction_tag.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/models/transaction_tag.go b/pkg/models/transaction_tag.go index 122af51a..232c3897 100644 --- a/pkg/models/transaction_tag.go +++ b/pkg/models/transaction_tag.go @@ -5,7 +5,7 @@ type TransactionTag struct { TagId int64 `xorm:"PK"` Uid int64 `xorm:"INDEX(IDX_tag_uid_deleted_group_order) NOT NULL"` Deleted bool `xorm:"INDEX(IDX_tag_uid_deleted_group_order) NOT NULL"` - TagGroupId int64 `xorm:"INDEX(IDX_tag_uid_deleted_group_order) NOT NULL"` + TagGroupId int64 `xorm:"INDEX(IDX_tag_uid_deleted_group_order) NOT NULL DEFAULT 0"` Name string `xorm:"VARCHAR(64) NOT NULL"` DisplayOrder int32 `xorm:"INDEX(IDX_tag_uid_deleted_group_order) NOT NULL"` Hidden bool `xorm:"NOT NULL"`