mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-02-04 10:26:01 -05:00
use github URLs in doc pointers
This is better particularly when the user is following the docker instructions and doesn't have a local checkout at all. It also is a rendered HTML view rather than raw markdown. It'd be nice to link to the exact release we're using, not tip of master. I didn't do this now because it'll likely take some work with build.rs to check if the user is on a tagged release or not. Fixes #180
This commit is contained in:
parent
09e57462dc
commit
0f6c1b3856
@ -2185,16 +2185,19 @@ fn get_boot_uuid() -> Result<Option<Uuid>, Error> {
|
||||
pub(crate) fn check_schema_version(conn: &rusqlite::Connection) -> Result<(), Error> {
|
||||
let ver = get_schema_version(conn)?.ok_or_else(|| {
|
||||
format_err!(
|
||||
"no such table: version. \
|
||||
If you are starting from an empty database, see README.md to \
|
||||
complete the installation. If you are starting from a database \
|
||||
that predates schema versioning, see guide/schema.md."
|
||||
"no such table: version.\n\n\
|
||||
If you have created an empty database by hand, delete it and use `nvr init` \
|
||||
instead, as noted in the installation instructions: \
|
||||
<https://github.com/scottlamb/moonfire-nvr/blob/master/guide/install.md>\n\n\
|
||||
If you are starting from a database that predates schema versioning, see \
|
||||
<https://github.com/scottlamb/moonfire-nvr/blob/master/guide/schema.md>."
|
||||
)
|
||||
})?;
|
||||
match ver.cmp(&EXPECTED_VERSION) {
|
||||
std::cmp::Ordering::Less => bail!(
|
||||
"Database schema version {} is too old (expected {}); \
|
||||
see upgrade instructions in guide/upgrade.md.",
|
||||
see upgrade instructions in \
|
||||
<https://github.com/scottlamb/moonfire-nvr/blob/master/guide/upgrade.md>.",
|
||||
ver,
|
||||
EXPECTED_VERSION
|
||||
),
|
||||
|
@ -229,7 +229,7 @@ async fn inner(args: Args, shutdown_rx: base::shutdown::Receiver) -> Result<i32,
|
||||
super::OpenMode::ReadWrite
|
||||
},
|
||||
)?;
|
||||
let db = Arc::new(db::Database::new(clocks, conn, !args.read_only).unwrap());
|
||||
let db = Arc::new(db::Database::new(clocks, conn, !args.read_only)?);
|
||||
info!("Database is loaded.");
|
||||
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user