From db443a9f82d108f0eabb6fe0379e02fd54ca5f8e Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Mon, 4 Sep 2023 16:24:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20migration=EF=BC=8C?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=8D=87=E7=BA=A7=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#2171)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/init/migration/migrations/init.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/init/migration/migrations/init.go b/backend/init/migration/migrations/init.go index 4af909d4d..6163e15e2 100644 --- a/backend/init/migration/migrations/init.go +++ b/backend/init/migration/migrations/init.go @@ -579,6 +579,9 @@ var AddTableFirewall = &gormigrate.Migration{ return err } _ = tx.Exec("alter table remote_dbs rename to databases;").Error + if err := tx.AutoMigrate(&model.Database{}); err != nil { + return err + } return nil }, }