Skip to main content

Module expected

Module expected 

Source
Expand description

Expected schema extraction from Model definitions.

This module provides utilities to extract the “expected” database schema from Rust Model definitions, which can then be compared against the actual database schema obtained via introspection.

Traits§

ModelSchema
Extension trait that adds schema extraction to Model types.
ModelTuple
Trait for tuples of Models to aggregate their schemas.

Functions§

expected_schema
Build a DatabaseSchema from a single Model.
normalize_sql_type
Normalize a SQL type for comparison across dialects.
table_schema_from_fields
Convert field metadata to a TableInfo.
table_schema_from_model
Extract a TableInfo from a Model type.