mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
feat: index songs.album_id for PostgreSQL (#1547)
This commit is contained in:
parent
aec70c9a2f
commit
13ffdcc648
2 changed files with 17 additions and 0 deletions
BIN
composer.phar
Normal file
BIN
composer.phar
Normal file
Binary file not shown.
|
@ -0,0 +1,17 @@
|
|||
<?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 function up(): void
|
||||
{
|
||||
Schema::table('songs', static function (Blueprint $table): void {
|
||||
if (DB::getDriverName() === 'pgsql') {
|
||||
$table->index('album_id');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue