Spinning out from #292 review (cc @MoralCode).
Stock alembic_utils ships PGMaterializedView for view definitions but doesn't track indexes. That's intentional, indexes are out-of-band for the library. PR #292 wraps it in a small dataclass that adds unique_index_columns, used by the refresh task to pick between REFRESH MATERIALIZED VIEW CONCURRENTLY and the non-concurrent path.
@MoralCode flagged candidhealth/alembic-utils-extended, a fork that adds native index support via SQLAlchemy index types. Worth a real look so we stop carrying unique_index_columns ourselves.
Three options:
- Adopt candidhealth's fork. Cleanest if it sticks, but 19 stars / 1 fork and last commit Dec 2025. hard to tell "stable and active" from "abandoned and stable."
- Add index support to stock
alembic_utils and try to upstream. If it lands, no fork at all. If the maintainer's slow, we vendor.
- Keep the wrapper. ~10 lines; cost is just keeping
unique_index_columns in sync with the DB.
Spinning out from #292 review (cc @MoralCode).
Stock
alembic_utilsshipsPGMaterializedViewfor view definitions but doesn't track indexes. That's intentional, indexes are out-of-band for the library. PR #292 wraps it in a small dataclass that addsunique_index_columns, used by the refresh task to pick betweenREFRESH MATERIALIZED VIEW CONCURRENTLYand the non-concurrent path.@MoralCode flagged candidhealth/alembic-utils-extended, a fork that adds native index support via SQLAlchemy index types. Worth a real look so we stop carrying
unique_index_columnsourselves.Three options:
alembic_utilsand try to upstream. If it lands, no fork at all. If the maintainer's slow, we vendor.unique_index_columnsin sync with the DB.