change torrent table info_hash nullable

This commit is contained in:
xiaomlove
2024-10-14 02:23:20 +08:00
parent 2750059bea
commit 61877894fe
2 changed files with 34 additions and 2 deletions

View File

@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$sql = 'ALTER table torrents MODIFY column `info_hash` binary(20) DEFAULT NULL';
\Illuminate\Support\Facades\DB::statement($sql);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
};