You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using PostgresStorage::setup() alongside application-level sqlx migrations on the same database, the two migrators share the same _sqlx_migrations table. Apalis's internal migrator only knows its own 2 migrations, so when it encounters user-defined migration entries in the table, it panics with:
migration XXXXXXXXXXXXXXX was previously applied but is missing in the resolved migrations
Suggested fix:
Expose a way to pass a custom migrations table name or schema to PostgresStorage::setup(), or
Internally call .set_ignore_missing(true) on Apalis's sqlx Migrator, or
Document that a separate database/schema is required when coexisting with user migrations
Expected behavior
Apalis should ignore migration entries it doesn't own, similar to sqlx's --ignore-missing / .set_ignore_missing(true) flag.
Steps to reproduce
Run app migrations via sqlx::migrate!().run(&pool) — records N migrations in _sqlx_migrations
Call PostgresStorage::setup(&pool) — Apalis sees unknown entries and errors out
Version
1.0.0-rc.x
Environment
OS: Linux sandwitch 6.19.2-2-cachyos V0.3 apalis#1 SMP PREEMPT_DYNAMIC Mon, 16 Feb 2026 20:41:55 +0000 x86_64 GNU/Linux
Rust version: 1.90
Cargo version: 1.90
Relevant log output
{"timestamp":"2026-02-28T11:56:24.712192Z","level":"ERROR","fields":{"message":"failed to establish connection to db: migration 20260106165349 was previously applied but is missing in the resolved migrations"},"target":"family_cloud::jobs"}
test delete::delete_list_of_folders ... FAILED
What happened?
Description:
When using
PostgresStorage::setup()alongside application-level sqlx migrations on the same database, the two migrators share the same_sqlx_migrationstable. Apalis's internal migrator only knows its own 2 migrations, so when it encounters user-defined migration entries in the table, it panics with:Suggested fix:
PostgresStorage::setup(), or.set_ignore_missing(true)on Apalis's sqlxMigrator, orExpected behavior
Apalis should ignore migration entries it doesn't own, similar to sqlx's
--ignore-missing/.set_ignore_missing(true)flag.Steps to reproduce
sqlx::migrate!().run(&pool)— records N migrations in_sqlx_migrationsPostgresStorage::setup(&pool)— Apalis sees unknown entries and errors outVersion
1.0.0-rc.x
Environment
Relevant log output
{"timestamp":"2026-02-28T11:56:24.712192Z","level":"ERROR","fields":{"message":"failed to establish connection to db: migration 20260106165349 was previously applied but is missing in the resolved migrations"},"target":"family_cloud::jobs"} test delete::delete_list_of_folders ... FAILEDAdditional context
No response