feat: Place migrator behind CHECK_DB_MIGRATION env

This commit is contained in:
sprites0
2025-11-01 09:36:30 +00:00
parent 893822e5b0
commit 1fe03bfc41

View File

@ -145,8 +145,12 @@ where
match self.command { match self.command {
Commands::Node(command) => runner.run_command_until_exit(|ctx| { Commands::Node(command) => runner.run_command_until_exit(|ctx| {
Self::migrate_db(&command.chain, &command.datadir, &command.db) // NOTE: This is for one time migration around Oct 10 upgrade:
.expect("Failed to migrate database"); // 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::<C, Ext>(launcher)) command.execute(ctx, FnLauncher::new::<C, Ext>(launcher))
}), }),
Commands::Init(command) => { Commands::Init(command) => {