pub fn column_equivalent(
c: &DeclaredColumnContract,
t: &CreateColumnDef,
) -> boolExpand description
Returns true when a live current column and a target
CreateColumnDef describe the same column shape.
Comparison rules (must mirror the no-op behavior of
apply_alter_operations_to_contract):
sql_type— primary identity.current.sql_typeisOption; whenNone(legacy contract), fall back to comparing the legacydata_typestring. Both sidesNone→ usedata_type.- constraint flags —
not_null,unique,primary_key,compressmust all match exactly. default— string compare after normalisation (trim + strip surrounding single quotes).- enum_variants — exact ordered Vec match.
- array_element — string compare.
- decimal_precision — exact match.
Legacy data_type field is intentionally not compared
when both sides have sql_type — data_type is derived
from sql_type and may differ in case or aliasing
without semantic impact.