File: /home/xedaptot/be.naniguide.com/database/migrations/2023_08_01_071320_create_categories_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if (!Schema::hasTable('categories')) {
Schema::create('categories', function (Blueprint $table) {
$table->id();
$table->uuid('uid')->nullable();
$table->string('name');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('categories');
}
}