2016-09-05 17:00:56 +01:00
|
|
|
<?php
|
|
|
|
|
2022-11-25 20:29:04 +00:00
|
|
|
use Illuminate\Support\Facades\Schema;
|
2016-09-05 17:00:56 +01:00
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
|
|
|
class CreateNotificationsTable extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*/
|
2022-11-25 20:29:04 +00:00
|
|
|
public function up(): void
|
2016-09-05 17:00:56 +01:00
|
|
|
{
|
|
|
|
Schema::create('notifications', function (Blueprint $table) {
|
|
|
|
$table->string('id')->primary();
|
|
|
|
$table->string('type');
|
|
|
|
$table->morphs('notifiable');
|
|
|
|
$table->text('data');
|
|
|
|
$table->timestamp('read_at')->nullable();
|
|
|
|
$table->timestamps();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*/
|
2022-11-25 20:29:04 +00:00
|
|
|
public function down(): void
|
2016-09-05 17:00:56 +01:00
|
|
|
{
|
|
|
|
Schema::drop('notifications');
|
|
|
|
}
|
|
|
|
}
|