rtimelogger 0.8.6

A simple cross-platform CLI tool to track working hours, lunch breaks, and calculate surplus time
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::db::migrate::run_pending_migrations;
use crate::errors::AppResult;
use rusqlite::Connection;

/// Initialize the database.
/// Delegates all schema creation / upgrades to the migration engine.
pub fn init_db(conn: &Connection) -> AppResult<()> {
    // NO direct CREATE TABLE here.
    // All schema is guaranteed by migrations.

    run_pending_migrations(conn)?;
    Ok(())
}