use serde::Serialize;
use super::undeclared::SchemaResidue;
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
pub struct ForeignKeyDrift {
pub extension: String,
pub table: String,
pub constraint: String,
pub sql: String,
pub cause: String,
}
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize)]
pub struct SchemaInstallReport {
pub foreign_key_drift: Vec<ForeignKeyDrift>,
pub residue: SchemaResidue,
}
impl SchemaInstallReport {
#[must_use]
pub const fn is_clean(&self) -> bool {
self.foreign_key_drift.is_empty()
}
#[must_use]
pub const fn is_tidy(&self) -> bool {
self.residue.is_empty()
}
}