Skip to main content

Crate waypoint_core

Crate waypoint_core 

Source
Expand description

Lightweight, Flyway-compatible PostgreSQL migration library.

§Quick Start

use waypoint_core::config::WaypointConfig;
use waypoint_core::Waypoint;

let config = WaypointConfig::load(None, None)?;
let wp = Waypoint::new(config).await?;
let report = wp.migrate(None).await?;
println!("Applied {} migrations", report.migrations_applied);

§Architecture

  • config — Configuration loading (TOML, env vars, CLI overrides)
  • migration — Migration file parsing and scanning
  • db — Database connections, TLS, advisory locks
  • history — Schema history table operations
  • commands — Individual command implementations (migrate, info, validate, repair, baseline, clean)
  • checksum — CRC32 checksums (Flyway-compatible)
  • placeholder${key} placeholder replacement in SQL
  • hooks — SQL callback hooks (before/after migrate)
  • error — Error types

Re-exports§

pub use commands::info::MigrationInfo;
pub use commands::info::MigrationState;
pub use commands::migrate::MigrateReport;
pub use commands::repair::RepairReport;
pub use commands::validate::ValidateReport;
pub use config::CliOverrides;

Modules§

checksum
CRC32 checksum calculation, compatible with Flyway’s line-by-line algorithm.
commands
Command implementations: migrate, info, validate, repair, baseline, clean.
config
Configuration loading and resolution.
db
Database connection, TLS support, advisory locking, and transaction execution.
error
Error types for Waypoint operations.
history
Schema history table operations (create, query, insert, update, delete).
hooks
SQL callback hooks that run before/after migrations (Flyway-compatible).
migration
Migration file parsing, scanning, and types.
placeholder
Placeholder replacement in SQL (${key} syntax).

Structs§

Waypoint
Main entry point for the Waypoint library.