Skip to content

sgns::Migration3_5_1To3_6_0

#include <Migration3_5_1To3_6_0.hpp>

Inherits from sgns::IMigrationStep, std::enable_shared_from_this< Migration3_5_1To3_6_0 >

Public Functions

Name
Migration3_5_1To3_6_0(std::shared_ptr< boost::asio::io_context > ioContext, std::shared_ptr< ipfs_pubsub::GossipPubSub > pubSub, std::shared_ptr< ipfs_lite::ipfs::graphsync::Network > graphsync, std::shared_ptr< libp2p::protocol::Scheduler > scheduler, std::shared_ptr< ipfs_lite::ipfs::graphsync::RequestIdGenerator > generator, std::string writeBasePath, std::string base58key)
virtual std::string FromVersion() const override
Get the version from which the migration starts.
virtual std::string ToVersion() const override
Get the version to which the migration applies.
virtual outcome::result< void > Init() override
Initializes internal variables after constructor.
virtual outcome::result< void > Apply() override
Execute the migration logic.
virtual outcome::result< void > ShutDown() override
Shuts down internal variables.
virtual outcome::result< bool > IsRequired() const override
Check if migration is required.

Additional inherited members

Public Functions inherited from sgns::IMigrationStep

Name
virtual ~IMigrationStep() =default
std::tuple< int, int, int > ParseVersion(const std::string & version) const
bool IsVersionLessThan(const std::string & lhs, const std::string & rhs) const

Public Functions Documentation

function Migration3_5_1To3_6_0

Migration3_5_1To3_6_0(
    std::shared_ptr< boost::asio::io_context > ioContext,
    std::shared_ptr< ipfs_pubsub::GossipPubSub > pubSub,
    std::shared_ptr< ipfs_lite::ipfs::graphsync::Network > graphsync,
    std::shared_ptr< libp2p::protocol::Scheduler > scheduler,
    std::shared_ptr< ipfs_lite::ipfs::graphsync::RequestIdGenerator > generator,
    std::string writeBasePath,
    std::string base58key
)

function FromVersion

virtual std::string FromVersion() const override

Get the version from which the migration starts.

Return: The source version string.

Reimplements: sgns::IMigrationStep::FromVersion

function ToVersion

virtual std::string ToVersion() const override

Get the version to which the migration applies.

Return: The target version string.

Reimplements: sgns::IMigrationStep::ToVersion

function Init

virtual outcome::result< void > Init() override

Initializes internal variables after constructor.

Return: Outcome of the operation

Reimplements: sgns::IMigrationStep::Init

function Apply

virtual outcome::result< void > Apply() override

Execute the migration logic.

Return: Outcome of the operation.

Reimplements: sgns::IMigrationStep::Apply

function ShutDown

virtual outcome::result< void > ShutDown() override

Shuts down internal variables.

Return: Outcome of the operation

Reimplements: sgns::IMigrationStep::ShutDown

function IsRequired

virtual outcome::result< bool > IsRequired() const override

Check if migration is required.

Return: outcome::result true if migration should run; false to skip. On error, returns failure.

Reimplements: sgns::IMigrationStep::IsRequired


Updated on 2026-03-04 at 13:10:43 -0800