Centralize durable schema migration ownership
This commit is contained in:
parent
cc328237f4
commit
069f3813ae
1 changed files with 354 additions and 350 deletions
|
|
@ -2,26 +2,22 @@ use std::{net::TcpListener, time::Duration};
|
|||
|
||||
use actix_web::{App, HttpServer, web};
|
||||
use futures_util::{SinkExt as _, StreamExt as _};
|
||||
use remora_admission::{AdmissionConfig, AdmissionService, migrate as admission_migrate};
|
||||
use remora_admission::{AdmissionConfig, AdmissionService};
|
||||
use remora_api::{
|
||||
PublicApiConfig, PublicApiServices, PublicApiState, configure_public_api,
|
||||
migrate as api_migrate, prune_live_event_history,
|
||||
prune_live_event_history,
|
||||
};
|
||||
use remora_attempt::{AttemptConfig, AttemptService, migrate as attempt_migrate};
|
||||
use remora_attempt::{AttemptConfig, AttemptService};
|
||||
use remora_contracts::{EventFrameDto, ResyncReasonDto};
|
||||
use remora_coordination::{
|
||||
ActivateOptions, CoordinationStore, LeaseOwner, ProgressValue, StoreConfig,
|
||||
};
|
||||
use remora_credentials::{
|
||||
CredentialRegistry, VaultClient, VaultConfig, migrate as credentials_migrate,
|
||||
};
|
||||
use remora_deletion::{
|
||||
DeletionConfig, DeletionService, TargetRegistry, migrate as deletion_migrate,
|
||||
};
|
||||
use remora_credentials::{CredentialRegistry, VaultClient, VaultConfig};
|
||||
use remora_deletion::{DeletionConfig, DeletionService, TargetRegistry};
|
||||
use remora_domain::{BucketName, OpaqueId, TargetPrefix, TargetStoreId};
|
||||
use remora_durable::{PoolConfig, connect, enqueue, migrate as durable_migrate};
|
||||
use remora_identity::{DefaultTarget, migrate as identity_migrate};
|
||||
use remora_result::migrate as result_migrate;
|
||||
use remora_durable::{PoolConfig, connect, enqueue};
|
||||
use remora_identity::DefaultTarget;
|
||||
use remora_schema::migrate as migrate_schema;
|
||||
use reqwest::{Client, StatusCode};
|
||||
use serde_json::{Value, json};
|
||||
use sqlx::PgPool;
|
||||
|
|
@ -73,14 +69,7 @@ impl Harness {
|
|||
)
|
||||
.await
|
||||
.unwrap();
|
||||
durable_migrate(&pool).await.unwrap();
|
||||
identity_migrate(&pool).await.unwrap();
|
||||
credentials_migrate(&pool).await.unwrap();
|
||||
admission_migrate(&pool).await.unwrap();
|
||||
attempt_migrate(&pool).await.unwrap();
|
||||
result_migrate(&pool).await.unwrap();
|
||||
deletion_migrate(&pool).await.unwrap();
|
||||
api_migrate(&pool).await.unwrap();
|
||||
migrate_schema(&pool).await.unwrap();
|
||||
sqlx::query("TRUNCATE TABLE jobs CASCADE")
|
||||
.execute(&pool)
|
||||
.await
|
||||
|
|
|
|||
Loading…
Reference in a new issue