fix(deployments): index history ordering and skip payload columns in lists

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai
2026-10-28 22:44:28 +01:00
co-authored by Claude Opus 5.5
parent 2b6af2744a
commit 2616b4bba1
7 changed files with 267 additions and 93 deletions
@@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public $withinTransaction = false;
public function up(): void
{
if (DB::getDriverName() === 'pgsql') {
DB::statement('CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_deployment_queues_app_created_id ON application_deployment_queues (application_id, created_at DESC, id DESC)');
return;
}
if (! Schema::hasIndex('application_deployment_queues', 'idx_deployment_queues_app_created_id')) {
Schema::table('application_deployment_queues', function (Blueprint $table) {
$table->index(['application_id', 'created_at', 'id'], 'idx_deployment_queues_app_created_id');
});
}
}
public function down(): void
{
if (DB::getDriverName() === 'pgsql') {
DB::statement('DROP INDEX CONCURRENTLY IF EXISTS idx_deployment_queues_app_created_id');
return;
}
if (Schema::hasIndex('application_deployment_queues', 'idx_deployment_queues_app_created_id')) {
Schema::table('application_deployment_queues', function (Blueprint $table) {
$table->dropIndex('idx_deployment_queues_app_created_id');
});
}
}
};