mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
change torrent table info_hash nullable
This commit is contained in:
@@ -100,8 +100,11 @@ class Test extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$ip = "116.77.75.254";
|
||||
$this->info(inet_pton($ip));
|
||||
$ip = "44,
|
||||
55,
|
||||
444,65 5 32";
|
||||
$result = preg_split("/[\r\n\s,,]+/", trim($ip));
|
||||
dd($result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user