Anki/rslib/src/storage/revlog/mod.rs
Damien Elmes d7f9bccd1e rewrite DB check
- notes with wrong field count are now recovered instead of
being deleted
- notes with missing note types are now recovered
- notes with missing cards are now recovered
- recover_missing_deck() still needs implementing
- checks required
2020-05-12 21:13:34 +10:00

15 lines
435 B
Rust

// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
use super::SqliteStorage;
use crate::err::Result;
use rusqlite::NO_PARAMS;
impl SqliteStorage {
pub(crate) fn fix_revlog_properties(&self) -> Result<usize> {
self.db
.prepare(include_str!("fix_props.sql"))?
.execute(NO_PARAMS)
.map_err(Into::into)
}
}