add: Sash.
parent
d5d20d2658
commit
ea77089427
|
|
@ -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');
|
||||
});
|
||||
}
|
||||
};
|
||||
Loading…
Reference in New Issue