Skip to content

Commit

Permalink
improvement: describe migration step that failed
Browse files Browse the repository at this point in the history
  • Loading branch information
scsibug committed Dec 9, 2023
1 parent 9c86f03 commit c5fb16c
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/repo/sqlite_migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ fn mig_init(conn: &mut PooledConnection) -> usize {
);
}
Err(err) => {
error!("update failed: {}", err);
error!("update (init) failed: {}", err);
panic!("database could not be initialized");
}
}
Expand Down Expand Up @@ -339,7 +339,7 @@ PRAGMA user_version = 2;
info!("database schema upgraded v1 -> v2");
}
Err(err) => {
error!("update failed: {}", err);
error!("update (v1->v2) failed: {}", err);
panic!("database could not be upgraded");
}
}
Expand All @@ -366,7 +366,7 @@ PRAGMA user_version = 3;
info!("database schema upgraded v2 -> v3");
}
Err(err) => {
error!("update failed: {}", err);
error!("update (v2->v3) failed: {}", err);
panic!("database could not be upgraded");
}
}
Expand Down Expand Up @@ -416,7 +416,7 @@ PRAGMA user_version = 4;
info!("database schema upgraded v3 -> v4");
}
Err(err) => {
error!("update failed: {}", err);
error!("update (v3->v4) failed: {}", err);
panic!("database could not be upgraded");
}
}
Expand All @@ -435,7 +435,7 @@ PRAGMA user_version=5;
info!("database schema upgraded v4 -> v5");
}
Err(err) => {
error!("update failed: {}", err);
error!("update (v4->v5) failed: {}", err);
panic!("database could not be upgraded");
}
}
Expand Down Expand Up @@ -507,7 +507,7 @@ PRAGMA user_version = 7;
info!("database schema upgraded v6 -> v7");
}
Err(err) => {
error!("update failed: {}", err);
error!("update (v6->v7) failed: {}", err);
panic!("database could not be upgraded");
}
}
Expand All @@ -528,7 +528,7 @@ PRAGMA user_version = 8;
info!("database schema upgraded v7 -> v8");
}
Err(err) => {
error!("update failed: {}", err);
error!("update (v7->v8) failed: {}", err);
panic!("database could not be upgraded");
}
}
Expand All @@ -548,7 +548,7 @@ PRAGMA user_version = 9;
info!("database schema upgraded v8 -> v9");
}
Err(err) => {
error!("update failed: {}", err);
error!("update (v8->v9) failed: {}", err);
panic!("database could not be upgraded");
}
}
Expand All @@ -567,7 +567,7 @@ PRAGMA user_version = 10;
info!("database schema upgraded v9 -> v10");
}
Err(err) => {
error!("update failed: {}", err);
error!("update (v9->v10) failed: {}", err);
panic!("database could not be upgraded");
}
}
Expand All @@ -588,7 +588,7 @@ PRAGMA user_version = 11;
info!("database schema upgraded v10 -> v11");
}
Err(err) => {
error!("update failed: {}", err);
error!("update (v10->v11) failed: {}", err);
panic!("database could not be upgraded");
}
}
Expand Down Expand Up @@ -643,7 +643,7 @@ PRAGMA user_version = 13;
info!("database schema upgraded v12 -> v13");
}
Err(err) => {
error!("update failed: {}", err);
error!("update (v12->v13) failed: {}", err);
panic!("database could not be upgraded");
}
}
Expand All @@ -663,7 +663,7 @@ PRAGMA user_version = 14;
info!("database schema upgraded v13 -> v14");
}
Err(err) => {
error!("update failed: {}", err);
error!("update (v13->v14) failed: {}", err);
panic!("database could not be upgraded");
}
}
Expand All @@ -682,7 +682,7 @@ PRAGMA user_version = 15;
info!("database schema upgraded v14 -> v15");
}
Err(err) => {
error!("update failed: {}", err);
error!("update (v14->v15) failed: {}", err);
panic!("database could not be upgraded");
}
}
Expand Down Expand Up @@ -786,7 +786,7 @@ PRAGMA user_version = 17;
info!("database schema upgraded v16 -> v17");
}
Err(err) => {
error!("update failed: {}", err);
error!("update (v16->v17) failed: {}", err);
panic!("database could not be upgraded");
}
}
Expand Down Expand Up @@ -833,7 +833,7 @@ PRAGMA user_version = 18;
info!("database schema upgraded v17 -> v18");
}
Err(err) => {
error!("update failed: {}", err);
error!("update (v17->v18) failed: {}", err);
panic!("database could not be upgraded");
}
}
Expand Down

0 comments on commit c5fb16c

Please sign in to comment.