2016-09-05 12:00:56 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
|
2024-03-19 21:03:50 -04:00
|
|
|
return new class extends Migration
|
2016-09-05 12:00:56 -04:00
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Run the migrations.
|
|
|
|
|
*/
|
2024-03-19 21:12:27 -04:00
|
|
|
public function up(): void
|
2016-09-05 12:00:56 -04:00
|
|
|
{
|
|
|
|
|
Schema::create('notifications', function (Blueprint $table) {
|
|
|
|
|
$table->string('id')->primary();
|
|
|
|
|
$table->string('type');
|
|
|
|
|
$table->morphs('notifiable');
|
2025-03-30 14:44:03 -04:00
|
|
|
$table->json('data');
|
2016-09-05 12:00:56 -04:00
|
|
|
$table->timestamp('read_at')->nullable();
|
|
|
|
|
$table->timestamps();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Reverse the migrations.
|
|
|
|
|
*/
|
2024-03-19 21:12:27 -04:00
|
|
|
public function down(): void
|
2016-09-05 12:00:56 -04:00
|
|
|
{
|
|
|
|
|
Schema::drop('notifications');
|
|
|
|
|
}
|
2024-03-19 21:03:50 -04:00
|
|
|
};
|