v0.3.3-pre.009-fix.006
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-store-postgres-lib/src/migration.rs
|
||||
// version: 6
|
||||
// version: 7
|
||||
|
||||
use sha2::Digest; // rust-rules: trait-import
|
||||
|
||||
@@ -557,10 +557,7 @@ async fn verify_or_repair_applied_migrations(
|
||||
crate::SchemaResourceState::Missing => {
|
||||
if !schema_autoupdate {
|
||||
log_schema_resource_block(resource.id, "schema_autoupdate_disabled");
|
||||
return std::result::Result::Err(crate::PostgresBackendError::new(
|
||||
crate::PostgresBackendErrorKind::MigrationFailed,
|
||||
"schema_autoupdate_disabled",
|
||||
));
|
||||
return std::result::Result::Err(schema_autoupdate_disabled_error());
|
||||
}
|
||||
let repair_result = ensure_resource(transaction, resource, SchemaMutationMode::Update, true).await;
|
||||
if let std::result::Result::Err(error) = repair_result {
|
||||
@@ -578,6 +575,10 @@ async fn verify_or_repair_applied_migrations(
|
||||
return std::result::Result::Ok(());
|
||||
}
|
||||
|
||||
fn schema_autoupdate_disabled_error() -> crate::PostgresBackendError {
|
||||
return crate::PostgresBackendError::new(crate::PostgresBackendErrorKind::MigrationMismatch, "schema_autoupdate_disabled");
|
||||
}
|
||||
|
||||
fn validate_embedded_registry(migrations: &[EmbeddedMigration]) -> std::result::Result<(), crate::PostgresBackendError> {
|
||||
if migrations.is_empty() {
|
||||
return std::result::Result::Err(crate::PostgresBackendError::new(crate::PostgresBackendErrorKind::MigrationMismatch, "registry_empty"));
|
||||
|
||||
Reference in New Issue
Block a user