Merge branch '1.7' into php8

This commit is contained in:
xiaomlove
2022-03-31 16:43:51 +08:00
140 changed files with 21731 additions and 273 deletions

View File

@@ -19,9 +19,8 @@ class CreateThanksTable extends Migration
Schema::create('thanks', function (Blueprint $table) {
$table->increments('id');
$table->unsignedMediumInteger('torrentid')->default(0);
$table->unsignedMediumInteger('userid')->default(0);
$table->unique(['torrentid', 'id'], 'torrentid_id');
$table->index(['torrentid', 'userid'], 'torrentid_userid');
$table->unsignedMediumInteger('userid')->default(0)->index();
$table->unique(['torrentid', 'userid']);
});
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddIndexToCheatersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('cheaters', function (Blueprint $table) {
$table->index('torrentid');
$table->index('userid');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('cheaters', function (Blueprint $table) {
});
}
}

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddStatusToUserMedalsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('user_medals', function (Blueprint $table) {
$table->integer('status')->default(1);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('user_medals', function (Blueprint $table) {
$table->dropColumn('status');
});
}
}

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddMarginPaddingToTagsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('tags', function (Blueprint $table) {
$table->string('padding')->default(0);
$table->string('margin')->default('0 4px 0 0');
$table->string('border_radius')->default(0);
$table->string('font_size')->default('12px');
$table->string('font_color')->default('#ffffff');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('tags', function (Blueprint $table) {
$table->dropColumn(['padding', 'margin', 'font_size', 'font_color', 'border_radius']);
});
}
}