42 lines
1.0 KiB
PHP
42 lines
1.0 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()
|
|
{
|
|
Schema::create('object', function (Blueprint $table) {
|
|
$table->unsignedInteger('id', true)->primary();
|
|
$table->unsignedInteger('land_id');
|
|
$table->unsignedInteger('vnum');
|
|
$table->integer('map_index');
|
|
$table->integer('x');
|
|
$table->integer('y');
|
|
$table->float('x_rot', null, 0);
|
|
$table->float('y_rot', null, 0);
|
|
$table->float('z_rot', null, 0);
|
|
$table->integer('life')->default(0);
|
|
|
|
$table->foreign('land_id')->references('id')->on('land');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('object');
|
|
}
|
|
};
|