syn2mas: provide guidance on how to re-do a fresh migration

This commit is contained in:
Quentin Gliech
2025-04-23 13:34:34 +02:00
parent fa1ecc5216
commit d62fe98f5a

View File

@@ -16,10 +16,12 @@ use super::{MAS_TABLES_AFFECTED_BY_MIGRATION, is_syn2mas_in_progress, locking::L
#[derive(Debug, Error, ContextInto)] #[derive(Debug, Error, ContextInto)]
pub enum Error { pub enum Error {
#[error("the MAS database is not empty: rows found in at least `{table}`")] #[error(
"The MAS database is not empty: rows found in at least `{table}`. Please drop and recreate the database, then try again."
)]
MasDatabaseNotEmpty { table: &'static str }, MasDatabaseNotEmpty { table: &'static str },
#[error("query against {table} failed — is this actually a MAS database?")] #[error("Query against {table} failed — is this actually a MAS database?")]
MaybeNotMas { MaybeNotMas {
#[source] #[source]
source: sqlx::Error, source: sqlx::Error,
@@ -29,7 +31,7 @@ pub enum Error {
#[error(transparent)] #[error(transparent)]
Sqlx(#[from] sqlx::Error), Sqlx(#[from] sqlx::Error),
#[error("unable to check if syn2mas is already in progress")] #[error("Unable to check if syn2mas is already in progress")]
UnableToCheckInProgress(#[source] super::Error), UnableToCheckInProgress(#[source] super::Error),
} }