mirror of
https://codeberg.org/YGGverse/ytd.git
synced 2026-04-08 04:55:26 +00:00
init db table on first launch
This commit is contained in:
parent
e1e9f34012
commit
532f87311b
1 changed files with 5 additions and 1 deletions
|
|
@ -10,7 +10,11 @@ pub struct Database(Db);
|
|||
impl Database {
|
||||
pub fn new(path: &PathBuf) -> Result<Self, Error> {
|
||||
let db = Db::create(path)?;
|
||||
|
||||
let write = db.begin_write()?;
|
||||
{
|
||||
write.open_table(PROCESSED)?;
|
||||
}
|
||||
write.commit()?;
|
||||
Ok(Self(db))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue