From fa53fa7935acb43f4729fb1de37a0e1d28787ea8 Mon Sep 17 00:00:00 2001 From: Wincent Holm Date: Sat, 19 Apr 2025 02:38:08 +0200 Subject: [PATCH] Migrations only flag (#1773) --- dMasterServer/MasterServer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dMasterServer/MasterServer.cpp b/dMasterServer/MasterServer.cpp index 89afb124..d2fa443d 100644 --- a/dMasterServer/MasterServer.cpp +++ b/dMasterServer/MasterServer.cpp @@ -213,6 +213,13 @@ int main(int argc, char** argv) { // Run migrations should any need to be run. MigrationRunner::RunSQLiteMigrations(); + // Check for the --migrations-only flag + if ((argc > 1 && + (strcmp(argv[1], "--migrations-only") == 0 || strcmp(argv[1], "-m") == 0))) { + LOG("Migrations only flag detected. Exiting."); + return EXIT_SUCCESS; + } + //If the first command line argument is -a or --account then make the user //input a username and password, with the password being hidden. bool createAccount = Database::Get()->GetAccountCount() == 0 && Game::config->GetValue("skip_account_creation") != "1";