add: Sash.

master
WildEgo 2025-09-08 11:09:55 +01:00
parent d5d20d2658
commit ea77089427
1 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,52 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('sash', function (Blueprint $table) {
$table->unsignedInteger('pid');
$table->timestamp('time')->useCurrent();
$table->tinyInteger('x');
$table->tinyInteger('y');
$table->integer('item_vnum');
$table->integer('item_uid');
$table->smallInteger('item_count');
$table->smallInteger('item_abs_chance');
$table->boolean('success');
$table->foreign('pid')->references('id')->on('player')->cascadeOnDelete();
});
Schema::table('player', function (Blueprint $table) {
$table->unsignedSmallInteger('part_sash')->default(0)->after('part_hair');
});
Schema::table('player_deleted', function (Blueprint $table) {
$table->unsignedSmallInteger('part_sash')->default(0)->after('part_hair');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('sash');
Schema::table('player', function (Blueprint $table) {
$table->dropColumn('part_sash');
});
Schema::table('player_deleted', function (Blueprint $table) {
$table->dropColumn('part_sash');
});
}
};