safe-migrate 0.3.0

Lint PostgreSQL migrations against live database statistics to prevent blocking locks
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// FILE: ./src/report/violations.rs

#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub enum ViolationTier {
    Tier3, // Silent pass / Information
    Tier2, // Warning, Share Row Exclusive
    Tier1, // Halts build, Access Exclusive
}

#[derive(Debug, Clone)]
pub struct Violation {
    pub rule_id: &'static str,
    pub title: String,
    pub tier: ViolationTier,
    pub recipe: &'static str,
    pub dedup_key: Option<String>,
}