aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Program.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-04-02 20:42:35 -0500
committerJP Dillingham <jp@dillingham.me>2025-04-02 20:42:35 -0500
commit47ea1847f89df9ca2ab2e7a51e29bab27f60f89b (patch)
tree5848bce732b4af93f8e7afb451946d81bc86c47b /src/slskd/Program.cs
parente08b71168e64928f0664eab2b7c070b9d20b6783 (diff)
downloadslskd-47ea1847f89df9ca2ab2e7a51e29bab27f60f89b.tar.gz
migrate if migrator exists
Diffstat (limited to 'src/slskd/Program.cs')
-rw-r--r--src/slskd/Program.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs
index 50ae7a07..8fbc0522 100644
--- a/src/slskd/Program.cs
+++ b/src/slskd/Program.cs
@@ -494,6 +494,13 @@ namespace slskd
var app = builder.Build();
+ var migrator = app.Services.GetService<Migrator>();
+
+ if (migrator is not null)
+ {
+ migrator.Migrate();
+ }
+
// hack: services that exist only to subscribe to the event bus are not referenced by anything else
// and are thus never instantiated. force a reference here so they are created.
_ = app.Services.GetService<ScriptService>();