Skip to main content

fathomdb_schema/
lib.rs

1#[macro_use]
2mod trace_support;
3
4mod bootstrap;
5mod migration;
6
7pub use bootstrap::{BootstrapReport, SchemaManager};
8pub use migration::{Migration, SchemaVersion};
9
10use thiserror::Error;
11
12#[derive(Debug, Error)]
13pub enum SchemaError {
14    #[error("sqlite error: {0}")]
15    Sqlite(#[from] rusqlite::Error),
16    #[error("missing sqlite capability: {0}")]
17    MissingCapability(&'static str),
18    #[error(
19        "database schema version {database_version} is newer than engine version {engine_version}; upgrade the engine"
20    )]
21    VersionMismatch {
22        database_version: u32,
23        engine_version: u32,
24    },
25}