procrastinate icon indicating copy to clipboard operation
procrastinate copied to clipboard

Historical migrations missing `CREATE INDEX procrastinate_jobs_queue_name_idx`

Open indrat opened this issue 3 months ago • 2 comments

procrastinate/sql/migrations/03.00.00_50_post_cancel_notification.sql renames procrastinate_jobs_queue_name_idx -> procrastinate_jobs_queue_name_idx_v1 however if soley using procrastinate/sql/migrations to transition the database that index won't have been created and the migration will fail. It appears that the procrastinate_jobs_queue_name_idx index was added to procrastinate/sql/schema.sql in procrastinate==0.11.0 but never added as a migration in procrastinate/sql/migrations.

indrat avatar Sep 20 '25 02:09 indrat

oops.

Would you like to create a PR to fix the migration ?

ewjoachim avatar Sep 26 '25 20:09 ewjoachim

I wonder a bit why this wasn't caught by our tests. Shouldn't run_migrations have failed on 03.00.00_50_post_cancel_notification.sql as it renames an index that isn't there? And shoudn't migra detect the schema difference?

medihack avatar Nov 09 '25 01:11 medihack