Expand description
Schema-diff types: compare two schema versions and produce structural changes. Schema-diff types.
Compares two db::Schema versions and produces
structured changes consumed by drivers to generate migrations.
§Examples
ⓘ
use toasty_core::schema::{db, diff};
let previous = db::Schema::default();
let next = db::Schema::default();
let hints = diff::RenameHints::new();
let d = diff::Schema::from(&previous, &next, &hints);
assert!(d.is_empty());Structs§
- Columns
- The set of differences between two column lists.
- Context
- Shared context passed to all diff computations.
- Indices
- The set of differences between two index lists.
- Rename
Hints - Hints that tell the diff algorithm which schema items were renamed.
- Schema
- The top-level diff between two database schemas.
- Tables
- The set of differences between two table lists.
- Types
- The diff between named enum types across two schema versions.
Enums§
- Columns
Item - A single change detected between two column lists.
- Indices
Item - A single change detected between two index lists.
- Tables
Item - A single change detected between two table lists.
- Types
Item - A single change to a named enum type.