feat: run migrations automatically
This commit is contained in:
parent
633f73199d
commit
b4c24182ee
|
@ -53,11 +53,11 @@ impl ForDiff {
|
|||
log::info!("Difficulty factor {difficulty} generated in {time}");
|
||||
times.push(time);
|
||||
}
|
||||
let mean = (times.iter().sum::<u128>()/ trials as u128) as u32 ;
|
||||
let mean = (times.iter().sum::<u128>() / trials as u128) as u32;
|
||||
let simple_variance: u32 = (times
|
||||
.iter()
|
||||
.map(|d| {
|
||||
let x = (*d as u32 - mean ) as u32;
|
||||
let x = (*d as u32 - mean) as u32;
|
||||
x * x
|
||||
})
|
||||
.sum::<u32>())
|
||||
|
@ -178,6 +178,11 @@ async fn main() {
|
|||
.await
|
||||
.unwrap();
|
||||
|
||||
sqlx::migrate!("./migrations/")
|
||||
.run(&sqlite_db)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
println!("{:?}", args);
|
||||
let sled_db = sled::open(args.sled).unwrap();
|
||||
for entry in sled_db.iter() {
|
||||
|
|
Loading…
Reference in a new issue