Skip to main content

database_bootstrap/
lib.rs

1//! Bootstrap system for database seed data.
2//!
3//! This crate provides a step-based bootstrap system for initializing database
4//! seed data after migrations. Each step can depend on other steps, verify
5//! whether its data is present, and is classified as required or optional.
6//!
7//! # Example
8//!
9//! ```ignore
10//! use database_bootstrap::{BootstrapRunner, RunOptions};
11//!
12//! let mut runner = BootstrapRunner::new();
13//! runner.add_step(...)?;
14//!
15//! let summary = runner.run(&db, &RunOptions::default()).await?;
16//! for output in summary.outputs {
17//!     println!("{}", output.title);
18//! }
19//! ```
20
21mod error;
22mod runner;
23mod step;
24mod traits;
25
26pub use error::BootstrapError;
27pub use runner::{BootstrapRunner, BootstrapSummary, RunOptions};
28pub use step::{BootstrapStep, Requirement, StepFactory, StepOutput, VerifyDetails, VerifyResult};