Lae/database/migrations/2022_08_13_083908_create_notifications_table.php

35 lines
768 B
PHP
Raw Normal View History

2022-08-13 08:37:17 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
2022-08-13 08:37:17 +00:00
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
2022-08-13 08:42:23 +00:00
Schema::create('notifications', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('type');
$table->morphs('notifiable');
$table->text('data');
$table->timestamp('read_at')->nullable();
2022-08-13 08:37:17 +00:00
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
2022-08-13 08:42:23 +00:00
Schema::dropIfExists('notifications');
2022-08-13 08:37:17 +00:00
}
};