Skip to main content

declare_primary_key_not_null

Function declare_primary_key_not_null 

Source
pub fn declare_primary_key_not_null(
    columns: &mut [ColumnDef],
    keys: &[TableKeyConstraint],
)
Expand description

A declared primary key makes each of its columns NOT NULL through a constraint of the new table: an inherited NOT NULL becomes local and takes the name generated for the new table, as AddRelationNotNullConstraints merges the declaration with the inherited constraint.