Centralize durable schema migration ownership
This commit is contained in:
parent
cc328237f4
commit
069f3813ae
1 changed files with 354 additions and 350 deletions
|
|
@ -1,17 +1,15 @@
|
|||
use std::sync::atomic::{AtomicU64, Ordering};
|
||||
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
||||
|
||||
use remora_admission::migrate as admission_migrate;
|
||||
use remora_attempt::migrate as attempt_migrate;
|
||||
use remora_credentials::migrate as credentials_migrate;
|
||||
use remora_deletion::{
|
||||
DeleteIdentity, DeletionConfig, DeletionError, DeletionProblemClass, DeletionService,
|
||||
DeletionState, DrainOutcome, LifecycleMutation, TargetRegistry, migrate as deletion_migrate,
|
||||
DeletionState, DrainOutcome, LifecycleMutation, TargetRegistry,
|
||||
};
|
||||
use remora_domain::{BucketName, OpaqueId, StorageScope, TargetPrefix, TargetStoreId};
|
||||
use remora_durable::{PoolConfig, connect, migrate as durable_migrate};
|
||||
use remora_durable::{PoolConfig, connect};
|
||||
use remora_identity::Principal;
|
||||
use remora_result::{PublicationInput, ResultInventory, ResultMember, migrate as result_migrate};
|
||||
use remora_result::{PublicationInput, ResultInventory, ResultMember};
|
||||
use remora_schema::migrate as migrate_schema;
|
||||
use remora_target::{
|
||||
CreateObjectRequest, ObjectIdentity, TargetError, TargetStore, TargetStoreConfig, hash_bytes,
|
||||
};
|
||||
|
|
@ -56,14 +54,7 @@ impl Harness {
|
|||
)
|
||||
.await
|
||||
.expect("connect postgres");
|
||||
durable_migrate(&pool).await.expect("durable migration");
|
||||
credentials_migrate(&pool)
|
||||
.await
|
||||
.expect("credentials migration");
|
||||
admission_migrate(&pool).await.expect("admission migration");
|
||||
attempt_migrate(&pool).await.expect("attempt migration");
|
||||
result_migrate(&pool).await.expect("result migration");
|
||||
deletion_migrate(&pool).await.expect("deletion migration");
|
||||
migrate_schema(&pool).await.expect("schema migration");
|
||||
sqlx::query("TRUNCATE TABLE jobs CASCADE")
|
||||
.execute(&pool)
|
||||
.await
|
||||
|
|
|
|||
Loading…
Reference in a new issue