Generates an Ecto migration that adds performance indexes to pgflow tables for faster dashboard queries.
Usage
mix pgflow_dashboard.gen.indexes
mix pgflow_dashboard.gen.indexes --migrations-path priv/repo/migrationsOptions
--migrations-path- Path to the migrations directory. Defaults topriv/repo/migrations.
Generated Indexes
This migration creates the following indexes:
idx_runs_started_at- For time-range filteringidx_runs_flow_status_started- For filtered run listsidx_runs_completed_at- For duration calculationsidx_step_states_status- For progress calculations
Note
These indexes are optional and primarily benefit dashboards with high query load. For small deployments, the default indexes may be sufficient.
Example
# Generate the migration
$ mix pgflow_dashboard.gen.indexes
# Run the migration
$ mix ecto.migrate