mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-12-03 06:22:32 -05:00
rustfmt everything
I want to make the project more accessible by not expecting folks to match my idiosyncratic style. Now almost [1] everything is written in the "standard" style. CI enforces this. [1] "Almost": I used #[rustfmt::skip] in a few sections where I felt aligning things in columns significantly improves readability.
This commit is contained in:
@@ -29,12 +29,12 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/// Upgrades a version 3 schema to a version 4 schema.
|
||||
|
||||
use failure::Error;
|
||||
|
||||
pub fn run(_args: &super::Args, tx: &rusqlite::Transaction) -> Result<(), Error> {
|
||||
// These create statements match the schema.sql when version 4 was the latest.
|
||||
tx.execute_batch(r#"
|
||||
tx.execute_batch(
|
||||
r#"
|
||||
alter table meta add column max_signal_changes integer check (max_signal_changes >= 0);
|
||||
|
||||
create table signal (
|
||||
@@ -191,6 +191,7 @@ pub fn run(_args: &super::Args, tx: &rusqlite::Transaction) -> Result<(), Error>
|
||||
-- This was supposed to be present in version 2, but the upgrade procedure used to miss it.
|
||||
-- Catch up so we know a version 4 database is right.
|
||||
create index if not exists user_session_uid on user_session (user_id);
|
||||
"#)?;
|
||||
"#,
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user