Introduces a migrate method on the Node struct to programmatically allow schema migrations and seeds.
let data = include_str!("schema.lock");
let lock_file: LockFile = toml::from_str(&data).expect("error parsing schema.lock file");
let node = Node::start(KeyPair::new(), Configuration::default()).await;
node.migrate(lock_file).await.expect("Migration failed");
This is maybe also a first step towards a general "low-level" API to interact with aquadoggo, for this we might want a NodeBuilder pattern instead to configure the node, while developers can use then the resulting Node itself to interact, but since this is a larger API change we should think this through a bit more.
Closes #597
📋 Checklist
[x] Add tests that cover your changes
[x] Add this PR to the Unreleased section in CHANGELOG.md
Introduces a
migrate
method on theNode
struct to programmatically allow schema migrations and seeds.This is maybe also a first step towards a general "low-level" API to interact with
aquadoggo
, for this we might want aNodeBuilder
pattern instead to configure the node, while developers can use then the resultingNode
itself to interact, but since this is a larger API change we should think this through a bit more.Closes #597
📋 Checklist
Add tests that cover your changesCHANGELOG.md