diff --git a/GeeksCoreLibrary/Core/Extensions/ConfigurationServiceCollectionExtensions.cs b/GeeksCoreLibrary/Core/Extensions/ConfigurationServiceCollectionExtensions.cs index b534b01f..dd10576e 100644 --- a/GeeksCoreLibrary/Core/Extensions/ConfigurationServiceCollectionExtensions.cs +++ b/GeeksCoreLibrary/Core/Extensions/ConfigurationServiceCollectionExtensions.cs @@ -169,7 +169,8 @@ public static IApplicationBuilder HandleStartupFunctions(this IApplicationBuilde WiserTableNames.WiserItemDetail, WiserTableNames.WiserItemFile, WiserTableNames.WiserItemLink, - WiserTableNames.WiserItemLinkDetail + WiserTableNames.WiserItemLinkDetail, + WiserTableNames.WiserUserRoles }; if (gclSettings.Value.LogOpeningAndClosingOfConnections) diff --git a/GeeksCoreLibrary/Modules/Databases/Helpers/WiserTableDefinitions.cs b/GeeksCoreLibrary/Modules/Databases/Helpers/WiserTableDefinitions.cs index b3cafb1c..be2e8032 100644 --- a/GeeksCoreLibrary/Modules/Databases/Helpers/WiserTableDefinitions.cs +++ b/GeeksCoreLibrary/Modules/Databases/Helpers/WiserTableDefinitions.cs @@ -1086,6 +1086,25 @@ public class WiserTableDefinitions new("groupname", MySqlDbType.VarChar, 100, notNull: true, defaultValue: ""), new("target_id", MySqlDbType.UInt64, notNull: true, defaultValue: "0") ] + }, + + // wiser_user_roles + + new WiserTableDefinitionModel + { + Name = WiserTableNames.WiserUserRoles, + LastUpdate = new DateTime(2025, 1, 24), + Columns = + [ + new("id", MySqlDbType.UInt64, notNull: true, isPrimaryKey: true, autoIncrement: true), + new("user_id", MySqlDbType.UInt64, notNull: true), + new("role_id", MySqlDbType.UInt64, notNull: true), + new("ip_addresses", MySqlDbType.JSON) + ], + Indexes = + [ + new(WiserTableNames.WiserUserRoles, "idx_user_id", IndexTypes.Unique, ["user_id", "role_id"]) + ] } ]; } \ No newline at end of file