|
|
@@ -383,7 +383,9 @@ public static class SqlSugarSetup
|
|
|
db.DbMaintenance.CreateDatabase();
|
|
|
|
|
|
// 获取所有业务表-初始化租户库表结构(排除系统表、日志表、特定库表)
|
|
|
- var entityTypes = App.EffectiveTypes.Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass && u.IsDefined(typeof(SugarTable), false) &&
|
|
|
+ var entityTypes = App.EffectiveTypes
|
|
|
+ .Where(u => !u.GetCustomAttributes<IgnoreTableAttribute>().Any())
|
|
|
+ .Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass && u.IsDefined(typeof(SugarTable), false) &&
|
|
|
!u.IsDefined(typeof(SysTableAttribute), false) && !u.IsDefined(typeof(LogTableAttribute), false) && !u.IsDefined(typeof(TenantAttribute), false)).ToList();
|
|
|
if (!entityTypes.Any()) return;
|
|
|
|