mix orkestra.projection.drop (orkestra v0.2.0)

Copy Markdown View Source

Rolls back all migrations for the named projection and deletes its checkpoint and dead-letter rows.

This is a destructive operation that removes all read-model tables and tracking state for the projection. The projection can be re-created by running mix orkestra.projection.migrate again, or a full rebuild can be done with mix orkestra.projection.rebuild.

The projection's repo, migration directory, and tracking table are discovered via __projection_config__/0 on the projector module (generated by use Orkestra.Projector).

Usage

mix orkestra.projection.drop MyApp.OrderProjector

What this does

  1. Rolls back ALL applied migrations for the named projection.
  2. Deletes the checkpoint row for this projector (avoids orphaned state that would cause the projector to skip replay on next start).
  3. Deletes all dead-letter rows for this projector.