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

36 lines
908 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', function (Blueprint $table) {
$table->id();
$table->string('version', 100)->nullable();
$table->unsignedBigInteger('os_group_id')->nullable();
$table->string('template_id')->nullable();
$table->tinyInteger('status')->default(1);
$table->timestamps();
$table->foreign('os_group_id', 'fk_os_group_id')->references('id')->on('os_group')->nullOnDelete();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('os');
}
};