Files
portal-api/database/migrations/2024_02_02_194120_os_group.php

40 lines
988 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('os_group',function (Blueprint $table) {
$table->id()->autoIncrement();
$table->string('name')->nullable();
$table->string('thumbnail')->nullable();
$table->unsignedBigInteger('module_host_id')->nullable();
$table->tinyInteger('status')->default(1);
$table->timestamps();
$table->foreign('module_host_id', 'fk_os_group_host')
->references('id')
->on('module_host')
->nullOnDelete();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('os_group');
}
};