fix: make notifications migration idempotent
This commit is contained in:
@@ -11,14 +11,16 @@ return new class extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::create('notifications', function (Blueprint $table) {
|
if (!Schema::hasTable('notifications')) {
|
||||||
$table->uuid('id')->primary();
|
Schema::create('notifications', function (Blueprint $table) {
|
||||||
$table->string('type');
|
$table->uuid('id')->primary();
|
||||||
$table->morphs('notifiable');
|
$table->string('type');
|
||||||
$table->text('data');
|
$table->morphs('notifiable');
|
||||||
$table->timestamp('read_at')->nullable();
|
$table->text('data');
|
||||||
$table->timestamps();
|
$table->timestamp('read_at')->nullable();
|
||||||
});
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user