Watch
0
0
Fork
You've already forked hyperhive
0

c0re: drop the removed agent_power store from db::open examples

This commit is contained in:
damocles 2026-11-07 01:26:29 +01:00 • committed by mara
commit beaf05ab9c

View file

@ -62,7 +62,7 @@ pub struct Migration {
/// the shared `schema_versions` table. /// the shared `schema_versions` table.
/// ///
/// - `subsystem` — unique key for this store in `schema_versions` /// - `subsystem` — unique key for this store in `schema_versions`
/// (e.g. `"broker"`, `"agent_power"`). /// (e.g. `"broker"`).
/// - `migrations` — ordered list of [`Migration`]s; migration `i` runs when /// - `migrations` — ordered list of [`Migration`]s; migration `i` runs when
/// the stored version is `i`. A pre-versioning DB (no `schema_versions` /// the stored version is `i`. A pre-versioning DB (no `schema_versions`
/// row) starts at version 0 and re-walks every migration, but each /// row) starts at version 0 and re-walks every migration, but each
@ -142,8 +142,7 @@ fn column_exists(conn: &Connection, table: &str, column: &str) -> Result<bool> {
} }
/// Open a connection to the sqlite file at `path`, creating the parent /// Open a connection to the sqlite file at `path`, creating the parent
/// directory if needed. `subsystem` labels error contexts (`"broker"`, /// directory if needed. `subsystem` labels error contexts (`"broker"`, …).
/// `"agent_power"`, …).
pub fn open(path: &Path, subsystem: &str) -> Result<Connection> { pub fn open(path: &Path, subsystem: &str) -> Result<Connection> {
if let Some(parent) = path.parent() { if let Some(parent) = path.parent() {
std::fs::create_dir_all(parent) std::fs::create_dir_all(parent)