add guest invitation read & valide with route
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateEventNonUserGuestsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('event_non_user_guests', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id');
|
||||
$table->string('email');
|
||||
$table->uuid('token')->default(\Illuminate\Support\Str::uuid());
|
||||
$table->timestamp('read_at')->nullable();
|
||||
$table->timestamp('validated_at')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('event_id')
|
||||
->references('id')
|
||||
->on('events')
|
||||
->onDelete('restrict')
|
||||
->onUpdate('restrict');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('event_non_user_guests', function (Blueprint $table) {
|
||||
$table->dropForeign(['event_id']);
|
||||
});
|
||||
|
||||
Schema::dropIfExists('event_non_user_guests');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user