evento-sql-migrator 2.0.0-alpha.28

SQL migrations for evento event sourcing library.
docs.rs failed to build evento-sql-migrator-2.0.0-alpha.28
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: evento-sql-migrator-2.0.0-alpha.27

evento-sql-migrator

Database schema migrations for the evento SQL backend (evento-sql), built on sqlx_migrator. Supports SQLite, MySQL, and PostgreSQL through feature flags.

Most applications use it through the evento facade, where it is re-exported as evento::sql_migrator:

[dependencies]
evento = { version = "2.0.0-alpha.27", features = ["sqlite"] }

Run all migrations before creating the executor (the snippet needs a database feature enabled, e.g. sqlite):

use sqlx_migrator::{Migrate, Plan};

# #[cfg(feature = "sqlite")]
# async fn run(pool: sqlx::SqlitePool) -> anyhow::Result<()> {
let mut conn = pool.acquire().await?;
evento_sql_migrator::new::<sqlx::Sqlite>()?
    .run(&mut *conn, &Plan::apply_all())
    .await?;
# Ok(())
# }

The resulting schema (event, snapshot, and subscriber tables) is documented in the crate docs.

Learn more