MicroFrameWork/_migrations/menuMigration.php

34 lines
880 B
PHP
Raw Normal View History

2024-08-30 11:27:10 +03:00
<?php
namespace _migrations;
use Illuminate\Database\Capsule\Manager;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class menuMigration extends Migration
{
public static function up(): void
{
Manager::schema()->create('menu', function (Blueprint $table) {
$table->increments('id');
$table->integer('parent_id')->default(1);
$table->string('icon_file', 255)->nullable(false);
$table->string('icon_font', 255);
$table->string('label', 255);
$table->string('url', 255);
$table->integer('status')->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public static function down(): void
{
Manager::schema()->dropIfExists('menu');
}
}