icy-musician-50528
05/28/2023, 9:54 AM2023-05-28T12:32:08.415508031Z INFO Entering loading state
2023-05-28T12:32:08.420443815Z TRACE shuttle_deployer::runtime_manager: making new client
2023-05-28T12:32:08.425105327Z DEBUG shuttle_deployer::runtime_manager: Starting alpha runtime at: /opt/shuttle/shuttle-executables/d3ea025d-fe4e-4972-a4b4-f0fe6d261912
2023-05-28T12:32:10.428831483Z INFO shuttle_proto::runtime: connecting runtime client
2023-05-28T12:32:10.428925119Z DEBUG hyper::client::connect::http: connecting to 127.0.0.1:19498
2023-05-28T12:32:10.431664770Z DEBUG hyper::client::connect::http: connected to 127.0.0.1:19498
2023-05-28T12:32:10.434448027Z DEBUG {service.ready=true} tower::buffer::worker: processing request
2023-05-28T12:32:10.437625123Z INFO shuttle_deployer::deployment::run: loading project from: /opt/shuttle/shuttle-executables/d3ea025d-fe4e-4972-a4b4-f0fe6d261912
2023-05-28T12:32:10.441717466Z DEBUG shuttle_deployer::deployment::run: loading service
In case it does matter, the way migrations were run were changed from this:
rust
db.execute(include_str!("../schema.sql")).await.unwrap();
to this:
rust
static MIGRATOR: sqlx::migrate::Migrator = sqlx::migrate!();
#[shuttle_runtime::main]
async fn init(
#[shuttle_shared_db::Postgres]
db: sqlx::PgPool,
#[shuttle_secrets::Secrets] secrets: shuttle_secrets::SecretStore,
) -> Result<CustomService, shuttle_runtime::Error> {
...
MIGRATOR
.run(&db)
.await
.map_err(|e| CustomError::new(e).context("Failed to apply migrations"))?;
...
}
icy-musician-50528
05/28/2023, 9:54 AMicy-musician-50528
05/28/2023, 9:57 AMicy-musician-50528
05/28/2023, 1:39 PMicy-musician-50528
05/28/2023, 1:42 PMicy-musician-50528
05/28/2023, 1:42 PMicy-musician-50528
05/28/2023, 1:46 PM