From ae48597f960831cb67173ffa1608f334b41befa9 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 19 Nov 2024 22:38:48 +0800 Subject: [PATCH] :card_file_box: Remove foreign key constraint to improve dx --- pkg/internal/database/source.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/internal/database/source.go b/pkg/internal/database/source.go index 7ae6651..eb859cc 100644 --- a/pkg/internal/database/source.go +++ b/pkg/internal/database/source.go @@ -24,7 +24,7 @@ func NewGorm() error { Colorful: true, IgnoreRecordNotFoundError: true, LogLevel: lo.Ternary(viper.GetBool("debug.database"), logger.Info, logger.Silent), - })}) + }), DisableForeignKeyConstraintWhenMigrating: true}) return err