Migrate core infrastructure to VoidLibrary
This commit is contained in:
1 parent
53801f2b53
commit
2bdb63766d
65 files changed
+16109
-12011
No files matched your search
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
#include "Types.hpp"
|
||||
#include "echoion/core/state/StateVersions.hpp"
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace Echoion::Core
|
||||
{
|
||||
|
||||
// Handles migration between state versions
|
||||
class StateMigration
|
||||
{
|
||||
public:
|
||||
|
||||
// Migrate from any old version to current
|
||||
static Api::Result<StateV1> migrate(uint32_t fromVersion,
|
||||
const std::string& jsonData);
|
||||
|
||||
// Specific migrations
|
||||
static StateV1 fromV0(const StateV0& v0);
|
||||
|
||||
// Check if migration path exists
|
||||
static bool canMigrate(uint32_t fromVersion);
|
||||
|
||||
private:
|
||||
|
||||
// Migration chain: V0 -> V1 -> V2 -> ...
|
||||
// Each version only knows how to migrate from previous
|
||||
};
|
||||
|
||||
} // namespace Echoion::Core
|
||||
Reference in new issue
Block a user