Skip to content

Commit 884dec1

Browse files
committed
Laravel Priority Queue
1 parent fd7e24e commit 884dec1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Database/Migrations/2022_03_31_17_00_00_create_priority_jobs_table.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ public function up(): void
1616
$table->unsignedInteger('reserved_at')->nullable();
1717
$table->unsignedInteger('available_at')->index();
1818
$table->unsignedInteger('created_at')->index();
19+
20+
$table->rawIndex(
21+
'priority DESC, created_at ASC',
22+
'idx_priority_sort'
23+
);
1924
});
2025
}
2126

0 commit comments

Comments
 (0)