Commit 513c73b
committed
fix: confine apalis's objects to the apalis schema (#86)
Move the objects apalis creates out of `public`
- generate_ulid() becomes apalis.generate_ulid() and no longer depends on
pgcrypto -- its 10 random bytes come from core gen_random_uuid() instead
of pgcrypto's gen_random_bytes(). A new forward migration creates it,
repoints the legacy (driver-unused) apalis.push_job at it, and drops
public.generate_ulid.
- The sqlx migrations table moves from public._sqlx_migrations to
apalis._sqlx_migrations via a new sqlx.toml (requires sqlx 0.9). This
also isolates apalis's migration history from a user's own sqlx
migrations, which previously collided over the shared default table name.
- pgcrypto is no longer used; it is left where an earlier version installed
it and documented as droppable.
The upgrade is automatic and non-breaking. PostgresStorage::setup()
relocates an existing apalis-owned public._sqlx_migrations into the apalis
schema and re-stamps checksums (read from the embedded migrator) before
running migrations, so existing deployments migrate with no manual steps
and nothing is re-run. The relocation is guarded so it never adopts a
user's own public._sqlx_migrations sharing the default name. The only
edited migration is the first one (CREATE SCHEMA -> CREATE SCHEMA IF NOT
EXISTS, so create-schemas can pre-create the schema on fresh installs);
its checksum is healed by the same transition.
Also bumps sqlx 0.8 -> 0.9 (remapping the runtime/TLS cargo features that
0.9 split apart) and updates deny.toml / cargo-vet for the new dep tree.1 parent 5a93021 commit 513c73b
21 files changed
Lines changed: 1197 additions & 884 deletions
File tree
- .sqlx
- migrations
- src
- supply-chain
Lines changed: 98 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 21 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 42 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments