Skip to content

Commit 3db04d5

Browse files
committed
syn2mas: provide guidance on how to re-do a fresh migration
1 parent 1b0b6a3 commit 3db04d5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

crates/syn2mas/src/mas_writer/checks.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ use super::{MAS_TABLES_AFFECTED_BY_MIGRATION, is_syn2mas_in_progress, locking::L
1616

1717
#[derive(Debug, Error, ContextInto)]
1818
pub enum Error {
19-
#[error("the MAS database is not empty: rows found in at least `{table}`")]
19+
#[error(
20+
"The MAS database is not empty: rows found in at least `{table}`. Please drop and recreate the database, then try again."
21+
)]
2022
MasDatabaseNotEmpty { table: &'static str },
2123

22-
#[error("query against {table} failed — is this actually a MAS database?")]
24+
#[error("Query against {table} failed — is this actually a MAS database?")]
2325
MaybeNotMas {
2426
#[source]
2527
source: sqlx::Error,
@@ -29,7 +31,7 @@ pub enum Error {
2931
#[error(transparent)]
3032
Sqlx(#[from] sqlx::Error),
3133

32-
#[error("unable to check if syn2mas is already in progress")]
34+
#[error("Unable to check if syn2mas is already in progress")]
3335
UnableToCheckInProgress(#[source] super::Error),
3436
}
3537

0 commit comments

Comments
 (0)