aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Program.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-04-01 19:14:06 -0500
committerJP Dillingham <jp@dillingham.me>2025-04-01 19:14:06 -0500
commite08b71168e64928f0664eab2b7c070b9d20b6783 (patch)
tree881461de46b265cf11706372cfca3571e6f12a5f /src/slskd/Program.cs
parenteec6e0f098effcb9bfda297a441ca7ffd8d33934 (diff)
downloadslskd-e08b71168e64928f0664eab2b7c070b9d20b6783.tar.gz
wip
Diffstat (limited to 'src/slskd/Program.cs')
-rw-r--r--src/slskd/Program.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs
index b7fa47d2..50ae7a07 100644
--- a/src/slskd/Program.cs
+++ b/src/slskd/Program.cs
@@ -596,6 +596,10 @@ namespace slskd
services.AddDbContext<TransfersDbContext>(DiskConnectionString("transfers"));
services.AddDbContext<MessagingDbContext>(DiskConnectionString("messaging"));
services.AddDbContext<EventsDbContext>(DiskConnectionString("events"));
+
+ // we're working with non-volatile database files, so register a Migrator to be used later in the
+ // bootup process. the presence of a Migrator instance in DI determines whether a migration is needed.
+ services.AddSingleton<Migrator>(_ => new Migrator());
}
services.AddSingleton<EventService>();