Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/client-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ pub struct DatabaseDef {
pub num_replicas: Option<NonZeroU8>,
/// The host type of the supplied program.
pub host_type: HostType,
pub parent: Option<Identity>,
}

/// Parameters for resetting a database via [`ControlStateDelegate::reset_database`].
Expand Down
5 changes: 5 additions & 0 deletions crates/client-api/src/routes/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,8 @@ pub struct PublishDatabaseQueryParams {
policy: MigrationPolicy,
#[serde(default)]
host_type: HostType,
#[allow(unused)] // ignore for now
parent: Option<NameOrIdentity>,
}

pub async fn publish<S: NodeDelegate + ControlStateDelegate>(
Expand All @@ -690,6 +692,7 @@ pub async fn publish<S: NodeDelegate + ControlStateDelegate>(
token,
policy,
host_type,
parent: _, // ignore for now
}): Query<PublishDatabaseQueryParams>,
Extension(auth): Extension<SpacetimeAuth>,
program_bytes: Bytes,
Expand Down Expand Up @@ -760,6 +763,7 @@ pub async fn publish<S: NodeDelegate + ControlStateDelegate>(
program_bytes,
num_replicas,
host_type,
parent: None,
},
schema_migration_policy,
)
Expand Down Expand Up @@ -912,6 +916,7 @@ pub async fn pre_publish<S: NodeDelegate + ControlStateDelegate>(
program_bytes,
num_replicas: None,
host_type,
parent: None,
},
style,
)
Expand Down
1 change: 1 addition & 0 deletions crates/testing/src/modules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ impl CompiledModule {
program_bytes: self.program_bytes(),
num_replicas: None,
host_type: self.host_type,
parent: None,
},
MigrationPolicy::Compatible,
)
Expand Down
Loading