File: /var/www/api_matriculas/database/migrations/2024_08_24_162243_create_permissions_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('permissions', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('permission', 255)->nullable();
$table->string('description', 255)->nullable();
$table->integer('order')->nullable();
$table->string('category', 100)->nullable();
$table->string('code', 100)->nullable();
$table->string('front_code', 100)->nullable();
$table->boolean('status')->default(true);
$table->timestamps();
$table->boolean('deleted')->default(0);
$table->timestamp('deleted_at')->nullable();
$table->unsignedBigInteger('user_created')->nullable();
$table->unsignedBigInteger('user_updated')->nullable();
$table->unsignedBigInteger('user_deleted')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('permissions');
}
};