Skip to main content

vespertide_core/
migration.rs

1#[derive(Debug, Clone)]
2pub struct MigrationOptions {
3    pub version_table: String,
4}
5
6#[derive(thiserror::Error, Debug)]
7pub enum MigrationError {
8    #[error("migration execution is not yet implemented")]
9    NotImplemented,
10    #[error("database error: {0}")]
11    DatabaseError(String),
12    #[error(
13        "migration id mismatch for version {version}: expected '{expected}', found '{found}' in database"
14    )]
15    IdMismatch {
16        version: u32,
17        expected: String,
18        found: String,
19    },
20}