fathomdb-schema 0.7.2

FathomDB schema — versioned migration registry and bootstrap (leaf crate).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Property-test scaffold for fathomdb-schema.
//
// Real targets (per ADR-0.6.0-json-schema-policy and ADR-0.6.0-decision-index):
//   - schema parse/serialize idempotence: parse(serialize(s)) == s
//   - schema version monotonicity: migration registry stays contiguous
//   - field-name canonicalization: round-trips through wire form
//
// Extend this as real schema types land.

use proptest::prelude::*;

proptest! {
    #[test]
    fn schema_version_covers_registered_migrations(_x in any::<u32>()) {
        let max_step = fathomdb_schema::MIGRATIONS.iter().map(|step| step.step_id).max().unwrap();
        prop_assert_eq!(fathomdb_schema::SCHEMA_VERSION, max_step);
    }
}