web/database/migrations/2024_03_30_000005_create_af...

40 lines
1.1 KiB
PHP

<?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()
{
// TODO Check dwPID as it's the only one that might be related to something
Schema::create('affect', function (Blueprint $table) {
$table->unsignedInteger('dwPID')->default(0);
$table->unsignedSmallInteger('bType')->default(0);
$table->unsignedTinyInteger('bApplyOn')->default(0);
$table->integer('lApplyValue')->default(0);
$table->unsignedInteger('dwFlag')->default(0);
$table->integer('lDuration')->default(0);
$table->integer('lSPCost')->default(0);
$table->primary(['dwPID', 'bType', 'bApplyOn', 'lApplyValue']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('affect');
}
};