c0re: drop the removed agent_power store from db::open examples
This commit is contained in:
parent
b77fa9edc3
commit
beaf05ab9c
1 changed files with 2 additions and 3 deletions
|
|
@ -62,7 +62,7 @@ pub struct Migration {
|
|||
/// the shared `schema_versions` table.
|
||||
///
|
||||
/// - `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
|
||||
/// the stored version is `i`. A pre-versioning DB (no `schema_versions`
|
||||
/// 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
|
||||
/// directory if needed. `subsystem` labels error contexts (`"broker"`,
|
||||
/// `"agent_power"`, …).
|
||||
/// directory if needed. `subsystem` labels error contexts (`"broker"`, …).
|
||||
pub fn open(path: &Path, subsystem: &str) -> Result<Connection> {
|
||||
if let Some(parent) = path.parent() {
|
||||
std::fs::create_dir_all(parent)
|
||||
|
|
|
|||
Loading…
Reference in a new issue