From 1fe03bfc41043f68178111af2d95f0bfd91853b4 Mon Sep 17 00:00:00 2001 From: sprites0 <199826320+sprites0@users.noreply.github.com> Date: Sat, 1 Nov 2025 09:36:30 +0000 Subject: [PATCH] feat: Place migrator behind `CHECK_DB_MIGRATION` env --- src/node/cli.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/node/cli.rs b/src/node/cli.rs index 71072a222..44990f70e 100644 --- a/src/node/cli.rs +++ b/src/node/cli.rs @@ -145,8 +145,12 @@ where match self.command { Commands::Node(command) => runner.run_command_until_exit(|ctx| { - Self::migrate_db(&command.chain, &command.datadir, &command.db) - .expect("Failed to migrate database"); + // NOTE: This is for one time migration around Oct 10 upgrade: + // It's not necessary anymore, an environment variable gate is added here. + if std::env::var("CHECK_DB_MIGRATION").is_ok() { + Self::migrate_db(&command.chain, &command.datadir, &command.db) + .expect("Failed to migrate database"); + } command.execute(ctx, FnLauncher::new::(launcher)) }), Commands::Init(command) => {