From 4cf8a171dffd962b911e8a7f12bc08ae2fdeee96 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 6 Nov 2025 23:36:00 +0000 Subject: [PATCH 1/2] Fix migration failure for missing procrastinate_jobs_queue_name_idx The index procrastinate_jobs_queue_name_idx was added to schema.sql in v0.11.0 but never had a corresponding migration. The migration 03.00.00_50_post_cancel_notification.sql tried to rename this index, which failed for users who only used migrations to set up their database. This fix adds the missing historical migration file at the correct version (00.11.00_04_add_jobs_queue_name_idx.sql) to create the index. This allows the later migration to simply rename it as originally intended. Fixes #1461 --- .../sql/migrations/00.11.00_04_add_jobs_queue_name_idx.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 procrastinate/sql/migrations/00.11.00_04_add_jobs_queue_name_idx.sql diff --git a/procrastinate/sql/migrations/00.11.00_04_add_jobs_queue_name_idx.sql b/procrastinate/sql/migrations/00.11.00_04_add_jobs_queue_name_idx.sql new file mode 100644 index 000000000..23dcdceb6 --- /dev/null +++ b/procrastinate/sql/migrations/00.11.00_04_add_jobs_queue_name_idx.sql @@ -0,0 +1,3 @@ +-- Add index on queue_name for better performance when querying jobs by queue +CREATE INDEX IF NOT EXISTS procrastinate_jobs_queue_name_idx ON procrastinate_jobs(queue_name); + From 355af6a95fc78c882c03c430e264bb33d4a74d3e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 8 Nov 2025 21:39:30 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../sql/migrations/00.11.00_04_add_jobs_queue_name_idx.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/procrastinate/sql/migrations/00.11.00_04_add_jobs_queue_name_idx.sql b/procrastinate/sql/migrations/00.11.00_04_add_jobs_queue_name_idx.sql index 23dcdceb6..1c96db099 100644 --- a/procrastinate/sql/migrations/00.11.00_04_add_jobs_queue_name_idx.sql +++ b/procrastinate/sql/migrations/00.11.00_04_add_jobs_queue_name_idx.sql @@ -1,3 +1,2 @@ -- Add index on queue_name for better performance when querying jobs by queue CREATE INDEX IF NOT EXISTS procrastinate_jobs_queue_name_idx ON procrastinate_jobs(queue_name); -