Merge branch 'php8' into section

This commit is contained in:
xiaomlove
2022-10-25 19:16:56 +08:00
168 changed files with 3072 additions and 621 deletions

View File

@@ -0,0 +1,38 @@
<?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()
{
Schema::create('plugins', function (Blueprint $table) {
$table->id();
$table->string('display_name')->nullable(true);
$table->string('package_name')->nullable(false)->unique();
$table->string('remote_url')->nullable(true);
$table->string('installed_version')->nullable(true);
$table->text('description')->nullable(true);
$table->integer('status')->default(-1);
$table->text('status_result')->nullable(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('plugins');
}
};

View File

@@ -0,0 +1,32 @@
<?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()
{
Schema::table('torrents', function (Blueprint $table) {
$table->dateTime('pos_state_until')->nullable(true)->after('pos_state');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('torrents', function (Blueprint $table) {
$table->dropColumn('pos_state_until');
});
}
};

View File

@@ -0,0 +1,33 @@
<?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()
{
Schema::table('torrents_custom_fields', function (Blueprint $table) {
$table->text('display')->nullable(true)->after('help');
$table->integer('priority')->default(0)->after('display');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('torrents_custom_fields', function (Blueprint $table) {
$table->dropColumn('display', 'priority');
});
}
};

View File

@@ -0,0 +1,38 @@
<?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()
{
Schema::table('complains', function (Blueprint $table) {
$table->string('ip')->nullable(true);
});
Schema::table('complain_replies', function (Blueprint $table) {
$table->string('ip')->nullable(true);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('complains', function (Blueprint $table) {
$table->dropColumn('ip');
});
Schema::table('complain_replies', function (Blueprint $table) {
$table->dropColumn('ip');
});
}
};