Expand description
Database schema introspection and diffing utilities.
Structs§
- Column
Diff - Represents a change in a column (addition or removal).
- Column
Nullability Diff - Represents a mismatch in column nullability.
- Column
Primary KeyDiff - Represents a mismatch in Primary Key status.
- Column
Type Diff - Represents a mismatch in column types between models and database.
- Schema
Column - Metadata about a database column.
- Schema
Diff - Represents the differences between two database schemas.
- Schema
Foreign Key - Metadata about a foreign key relationship.
- Schema
Index - Metadata about a database index.
- Schema
Table - Metadata about a database table.
Traits§
- Model
Schema - A trait for models that can provide their own schema metadata.
Functions§
- diff_
schema - Calculates the difference between two sets of table metadata.
- diff_
sqlite_ schema sqlite - Compares the actual SQLite schema with an expected list of tables.
- format_
schema_ diff_ summary - Formats a
SchemaDiffinto a human-readable summary. - introspect_
sqlite_ schema sqlite - Introspects the schema of a SQLite database.
- sqlite_
migration_ sql - Generates SQLite migration SQL based on the provided schema differences.