1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! # Vespertide
//!
//! Declarative database schema management for Rust. Define schemas in JSON,
//! generate migration plans, emit SQL for PostgreSQL/MySQL/SQLite, and export
//! ORM models for SeaORM/SQLAlchemy/SQLModel/JPA.
//!
//! This is the facade crate; runtime migrations use [`vespertide_migration!`].
//! Advanced users may depend on `vespertide-core` directly for typed data structures.
//!
//! ## Quick Start
//!
//! Add to `Cargo.toml`:
//!
//! ```toml
//! [dependencies]
//! vespertide = "0.2"
//! sea-orm = { version = "2", features = ["sqlx-postgres", "runtime-tokio-native-tls"] }
//! ```
//!
//! Run migrations at application startup:
//!
//! ```rust,ignore
//! use sea_orm::Database;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let db = Database::connect("postgres://user:pass@localhost/mydb").await?;
//! vespertide::vespertide_migration!(db).await?;
//! Ok(())
//! }
//! ```
//!
//! Customise the version-tracking table name:
//!
//! ```rust
//! use vespertide::MigrationOptions;
//!
//! // MigrationOptions::new() is the simplest constructor.
//! let opts = MigrationOptions::new("app_schema_versions");
//! assert_eq!(opts.version_table, "app_schema_versions");
//!
//! // Default gives the standard table name.
//! let default_opts = MigrationOptions::default();
//! assert_eq!(default_opts.version_table, "vespertide_migrations");
//! ```
// Re-export macro for convenient usage
pub use vespertide_migration;
// Re-export other commonly used items
pub use ;