add alersts api

This commit is contained in:
nurmuhammet committed 2024-11-26 01:16:49 +05:00
1 parent 55060d1ad2
commit 5d5e269285
6 files changed
+116 -1

No files matched your search

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('alerts', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
$table->text('name');
$table->text('value');
$table->timestamp('seen_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('alerts');
}
};