Lae/database/migrations/2022_08_12_123308_create_modules_table.php

39 lines
706 B
PHP
Raw Normal View History

2022-08-13 06:04:47 +00:00
<?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('modules', function (Blueprint $table) {
$table->id();
// name
$table->string('name')->index();
// type
$table->string('type')->index();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('modules');
}
};