start guest invitation on event
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateEventGuestTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('event_guest', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id');
|
||||
$table->foreignId('user_id');
|
||||
$table->boolean('is_staff')->default(false);
|
||||
$table->timestamp('validated_at')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('event_id')->references('id')->on('events');
|
||||
$table->foreign('user_id')->references('id')->on('users');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('event_guest', function (Blueprint $table) {
|
||||
$table->dropForeign(['event_id']);
|
||||
$table->dropForeign(['user_id']);
|
||||
});
|
||||
|
||||
Schema::dropIfExists('event_guest');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user