cratestack_sql/descriptor/defaults.rs
1#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2pub enum CreateDefaultType {
3 Bool,
4 Int,
5 String,
6}
7
8#[derive(Debug, Clone, Copy, PartialEq, Eq)]
9pub struct CreateDefault {
10 pub column: &'static str,
11 pub auth_field: &'static str,
12 pub ty: CreateDefaultType,
13 pub nullable: bool,
14 /// Whether the auth field is required (non-optional) in the auth block.
15 /// When true, a missing auth field should cause validation to fail,
16 /// even if the model field is nullable. This prevents tenant-isolation
17 /// issues where NULL values bypass policy predicates.
18 pub auth_field_required: bool,
19}