fix(link-tracker): prefix index on target_url for MySQL 5.7 compat
Build and Deploy / verify (push) Successful in 1m3s
Build and Deploy / deploy (push) Successful in 33s

This commit is contained in:
2026-09-07 19:33:47 +00:00
parent 6f1a25f7fa
commit d5e68ab6fc
@@ -4,6 +4,7 @@ declare(strict_types=1);
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
@@ -24,7 +25,8 @@ return new class extends Migration
$table->timestamp('last_clicked_at')->nullable();
$table->timestamps();
$table->index('target_url');
// MySQL 5.7 不支持对 TEXT 建全值索引,用前缀索引
$table->index([DB::raw('target_url(191)')], 'redirects_target_url_index');
});
}