apalis-dev / apalis-dev/apalis-postgres

Release rc.9, migration isolation (apalis._sqlx_migrations), it's on main but unreleased

Aperta
#113 0 commenti 0 reazioni 1 assegnatario Rivendicata da @geofmureithi Vedi su GitHub
Lingua principale
Rust
Stelle
9
Fork
13
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

The README on `main` documents migration tracking in `apalis._sqlx_migrations` via `sqlx.toml`, but the latest published crate (`1.0.0-rc.8`, sqlx 0.8) still migrates against the default `public._sqlx_migrations`.

Any app tracking its own migrations with sqlx (e.g. sqlx-cli) collides with `setup()` or whichever migrator runs second fails.

## Repro

Our migrations run first `sqlx database drop && sqlx database create && sqlx migrate run && cargo run` returns

```
2026-09-13T17:06:08.170485Z INFO heirloom_backend::app: Redis client configured
2026-09-13T17:06:08.171076Z INFO sqlx::postgres::notice: relation "_sqlx_migrations" already exists, skipping

thread 'main' (677167) panicked at src/app.rs:105:10:
failed to run apalis migrations: Migrate(VersionMissing(20260513185704))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

When reversed, i.e own migrations are run last `sqlx database drop && sqlx database create && cargo run && sqlx migrate run`

```bash
error: migration 20220530084123 was previously applied but is missing in the resolved migrations
```
## Suggested

Relase the rc containing the `apalis._sqlx_migrations` isolation (works when using the git crate i.e `apalis-postgres = { git = "https://github.com/apalis-dev/apalis-postgres" }`).

This should also align with what the Readme suggests, and also the wording concerning the pre-1 and how migrations happen could be made tighter and less vague. e.g does *fresh* mean an empty DB, or a DB without pre-v1.0 apalis history? It's ambiguous for anyone migrating an existing app database

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.