Commit graph

38 commits

Author SHA1 Message Date
Pat Hartl
790311ac8d Various fixes for MySQL/MariaDB
- Regenerate migrations
- Fix identity database context lifetimes
- Fix rendering of edit components
- Move database settings to separate section
2026-06-12 23:48:11 -05:00
Pat Hartl
ecdc5f9ce3 Add options to redistributables
Options are defined schema that the redistributable will allow a game to customize / override. This will be useful for install scripts on a redistributable. It opens up the opportunity to define a redistributable for something such as dgVoodoo and override options on a per-game basis without having to edit the config manually in the game's scripts.
2026-05-15 00:14:46 -05:00
Pat Hartl
e56371cd7c Add support for external IDs beyond IGDB 2026-05-14 00:30:45 -05:00
Pat Hartl
bcfa9768fc Add ratings to DB. Add popular/backlog games to depot. 2026-04-01 23:13:33 -05:00
Pat Hartl
120e14d40c Add Tools section to server app
Allows users to upload additional tools and tie them to games. This can be useful for software like map editors, trainers, etc.
2026-02-08 02:24:53 -06:00
Pat Hartl
66abc6e59e Implement infinite loading with chat thread
- Chat messages are now loaded based on scroll position
- Read status is now updated and set by last message read
- Reworked script importing by using ScriptProvider
2026-01-11 14:38:24 -06:00
Pat Hartl
a0c7bf63f0 Fix ability to add database migrations 2026-01-10 20:02:45 -06:00
Pat Hartl
add770b227 Refactor Settings
Settings for the server are now combined with the settings from the SDK. This introduces a large breaking change and a migration should be created. This refactor utilizes .NET Configuration and the Options pattern. This will allow for the overriding of any setting using envionment variables. It also means that Settings.yml can be used to override any .NET configuration. A SettingsProvider implementation was created, and any updating of settings was changed from SettingsService.SaveSettings() to SettingsProvider.Update(s => { ... })
2025-11-16 12:31:25 -06:00
Pat Hartl
4535d9891a Add chat read status, badges to avatars, avatars for groups 2025-11-12 18:26:25 -06:00
Pat Hartl
188926e37b Add new RPC hub, migrate existing SignalR messaging to strongly typed RPC, add chat data migrations 2025-08-28 19:57:23 -05:00
Pat Hartl
fd3fbf4a75 Initial backend implementation for chat 2025-08-19 03:08:30 -05:00
RattleSN4K3
10bbdcb0ce Database intercepter to sanitize game saves (like recursion and kept base game reference) 2025-05-18 19:46:42 +02:00
Pat Hartl
06b638e592 Make Settings / Users a searchable datatable 2025-03-09 01:43:12 -06:00
Pat Hartl
b1c6c82f84 Fix shadow properties on HTTP paths and server consoles 2025-02-12 21:05:33 -06:00
Pat Hartl
2012f12379 Fix MySQL migrations
Fixes #168
2025-02-12 20:39:47 -06:00
Pat Hartl
841fd2cb7b Remove DI auditing interceptor 2025-02-09 19:04:46 -06:00
Pat Hartl
b28e8a51ee Fix auditing
The way updates are being handled means that the auditing interceptor doesn't work as the entities are not showing in the change tracker at that stage as modified. Added the auditing to BaseDatabaseService instead.
2025-02-09 18:53:40 -06:00
Pat Hartl
69e903499b Add auditing interceptor 2025-02-02 19:14:06 -06:00
Pat Hartl
254a653cbb Fix game adds 2025-01-20 17:30:11 -06:00
Pat Hartl
8f6ad14d7e Fix eager loading 2024-12-20 11:34:59 -06:00
Pat Hartl
5de9eccce1 Adjust Blazor server-side to pull data with new context 2024-11-25 22:29:56 -06:00
Pat Hartl
b52c84992e Remove mutex 2024-11-22 02:13:32 -06:00
Pat Hartl
ddce80d296 Rename semaphore to mutex 2024-11-08 00:39:55 -06:00
Pat Hartl
8996c04c83 Add eager loading to repo. Move semaphore to DbContext. Inject DbContext instead of factory to open less connections 2024-11-07 01:40:05 -06:00
Pat Hartl
e30a1baef3 Start of migrations, services, controllers 2024-10-31 01:54:34 -05:00
Pat Hartl
142475ea7b Go back to tracking 2024-10-23 02:32:00 -05:00
Pat Hartl
9f1f4d7e12 Make DatabaseContext use no tracking 2024-10-23 01:59:01 -05:00
Pat Hartl
42ca5c323a WIP MySQL concurrency fixes
- Removed the Blazor authentication pages and went back to Razor pages
- Fixed issues with dashboard charts that were pulling data on render and causing the database context to be open longer than it should
- Switched back to UserManager and RoleManager
- Temporarily disabled authentication state in pages that might try to use user claims/roles
- Reverted spacing changes to forms to allow for validation messages
- Moved initialization of database connection to database context
- Updated PostgreSQL provider
- Rescaffolded MySQL migrations
- Added a bunch of logging stuff that should eventually be stripped out
2024-10-21 20:06:52 -05:00
Pat Hartl
2056b06207 Working new login page 2024-10-18 19:15:05 -05:00
Pat Hartl
524f4c9573 Back to managers 2024-10-16 16:29:55 -05:00
Pat Hartl
91829f601d Enable navigation properties for user roles, use service in place of managers 2024-10-16 01:54:51 -05:00
Pat Hartl
14df6bc95c Use custom models for identities 2024-10-15 23:48:16 -05:00
Pat Hartl
cf9d9f6253 Rename identity tables 2024-10-15 20:48:06 -05:00
Pat Hartl
2e5ae435bd Move Identity user store to separate database context 2024-10-14 01:29:45 -05:00
Pat Hartl
2805f34449 WIP fix for MySQL connection concurrency issues
This is a large commit. There are a number of things that this commit does to try to fix various issues that were occurring when the database provider was set to MySQL:
- The DAL `Repository` has been completely refactored to follow best practices. The repository is now being injected into services instead of the database context itself. This allows the DI to handle the repository's lifetime instead of creating a new repository for every transaction and sharing the context across repositories. As part of these changes, there is no more allowed usage of `IQueryable` and all service/repository methods must actually execute database queries before their return. This is to ensure that the context does not stay open longer than it needs to. Abusing `IQueryable`s by tossing them into Blazor components seems to be a big no-no.
- Some deletion behaviors on relationships have been tweaked as MySQL wasn't able to apply migrations with behaviors that were contradictory.
- A `ConnectionInterceptor` was added to try to keep track of `DatabaseContext` lifetimes. This is really only for debugging and should be put into `#if DEBUG` regions. This helped identify some potential issues where some contexts were basically never closing, causing the MySQL connector to not function.
- Docs for generating migrations have been updated to reflect the addition of being able to specify the database provider and connection string when adding a migration, avoiding the need to edit `Settings.yml`
- The application can now be put into a pause state on startup by adding the `--debugger` argument when used from the command line. When a debugger is attached, it resumes execution.
- The application can now log to Seq when using debug build
- Service lifetime on `DatabaseContext` has switched to transient. This may be reverted in the future.
- Lazy loading has been disabled for debugging purposes. It didn't directly help the concurrency issues, but it needs to be tested individually to be re-enabled.
- All usage of `UserManager`, `RoleManager`, and `SignInManager` have been removed from all controllers, pages, and Blazor components. Functionality has been moved to `UserService` and `RoleService`. This might have done the most amount of help, but could probably be improved upon in the future by not relying on them and instead having our own implementation.
- Application startup migrations and server autostarts have been disabled temporarily. There might be an issue of `DatabaseContext` lifetimes that spawn from this.
2024-10-13 20:42:45 -05:00
Pat Hartl
e236c2b25b Refactored first time setup
Fixes #128
2024-10-12 18:36:00 -05:00
Pat Hartl
07882e39d2 Add ability to specify multiple upload folders for archives
Implements #97
2024-10-11 01:09:12 -05:00
Pat Hartl
91ee1d47a9 Move data and service layers to separate projects, update packages 2024-10-07 18:04:26 -05:00
Renamed from LANCommander.Server/Data/DatabaseContext.cs (Browse further)