38 lines
944 B
PHP
38 lines
944 B
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('menu', function (Blueprint $table) {
|
||
|
|
$table->bigInteger('id', false, true)->primary();
|
||
|
|
$table->string('title', 255);
|
||
|
|
$table->string('url', 255);
|
||
|
|
$table->string('icon', 255)->nullable();
|
||
|
|
$table->bigInteger('parent_id')->nullable();
|
||
|
|
$table->integer('order', false, true)->default(0);
|
||
|
|
$table->timestamp('created_at', 6)->nullable();
|
||
|
|
$table->timestamp('updated_at', 6)->nullable();
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Reverse the migrations.
|
||
|
|
*
|
||
|
|
* @return void
|
||
|
|
*/
|
||
|
|
public function down()
|
||
|
|
{
|
||
|
|
Schema::dropIfExists('menu');
|
||
|
|
}
|
||
|
|
};
|