Roundtrip schemas in syncback (#1173)

This commit is contained in:
Micah
2025-11-26 16:11:39 -08:00
committed by GitHub
parent a99e877b7c
commit a61a1bef55
64 changed files with 189 additions and 17 deletions

View File

@@ -66,6 +66,10 @@ pub struct InstanceMetadata {
/// The Middleware that was used to create this Instance. Should generally
/// not be `None` except if the snapshotting process is not completed.
pub middleware: Option<Middleware>,
/// A schema provided via a JSON file, if one exists. Will be `None` for
/// all non-JSON middleware.
pub schema: Option<String>,
}
impl InstanceMetadata {
@@ -77,6 +81,7 @@ impl InstanceMetadata {
context: InstanceContext::default(),
specified_id: None,
middleware: None,
schema: None,
}
}
@@ -121,6 +126,10 @@ impl InstanceMetadata {
..self
}
}
pub fn schema(self, schema: Option<String>) -> Self {
Self { schema, ..self }
}
}
impl Default for InstanceMetadata {

View File

@@ -15,5 +15,5 @@ metadata:
emit_legacy_scripts: true
specified_id: ~
middleware: ~
schema: ~
children: []

View File

@@ -13,5 +13,5 @@ metadata:
emit_legacy_scripts: true
specified_id: ~
middleware: ~
schema: ~
children: []

View File

@@ -15,5 +15,5 @@ metadata:
emit_legacy_scripts: true
specified_id: ~
middleware: ~
schema: ~
children: []

View File

@@ -13,5 +13,5 @@ metadata:
emit_legacy_scripts: true
specified_id: ~
middleware: ~
schema: ~
children: []

View File

@@ -14,9 +14,9 @@ added_instances:
emit_legacy_scripts: true
specified_id: ~
middleware: ~
schema: ~
name: New
class_name: Folder
properties: {}
children: []
updated_instances: []