From f2e3c09076e1621b90d19f41611014d12605ee9d Mon Sep 17 00:00:00 2001 From: fuxing168 Date: Wed, 24 Sep 2025 09:07:52 +0000 Subject: [PATCH] =?UTF-8?q?update=20Admin.NET/Admin.NET.Core/SqlSugar/SqlS?= =?UTF-8?q?ugarSetup.cs.=20=E6=88=91=E5=8F=91=E7=8E=B0=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=98=AF=E6=97=A0=E6=B3=95=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=95=B0=E6=8D=AE=E5=BA=93=EF=BC=8C=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?=E6=98=AF=E6=95=B0=E6=8D=AE=E5=BA=93=E4=B8=8D=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=EF=BC=8C=E6=89=80=E4=BB=A5InitDataBase=E5=85=88=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E5=88=9D=E5=A7=8B=E5=8C=96=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=EF=BC=8C=E5=86=8D=E8=BF=9B=E8=A1=8C=E7=AD=89=E5=BE=85=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fuxing168 --- Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs b/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs index 8d8e58b05..9d8f7c0e1 100644 --- a/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs +++ b/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs @@ -401,16 +401,16 @@ public static class SqlSugarSetup { var dbProvider = db.GetConnectionScope(config.ConfigId); - // 等待数据库连接就绪 - WaitForDatabaseReady(dbProvider); - - // 初始化数据库 + // 初始化数据库 如果是没有数据库的话,是先初始化数据库再做连接 if (config.DbSettings.EnableInitDb) { Log.Information($"初始化数据库 {config.DbType} - {config.ConfigId} - {config.ConnectionString}"); if (config.DbType != DbType.Oracle) dbProvider.DbMaintenance.CreateDatabase(); } + // 等待数据库连接就绪 + WaitForDatabaseReady(dbProvider); + // 初始化表结构 if (config.TableSettings.EnableInitTable) { -- Gitee