Skip to content

Commit

Permalink
feat: Create migration for team_invitations table
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] committed Mar 10, 2024
1 parent 8bf1833 commit 1718929
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTeamInvitationsTable extends Migration
{
public function up()
{
Schema::create('team_invitations', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('team_id');
$table->string('email');
$table->string('token', 64)->unique();
$table->timestamps();

$table->foreign('team_id')->references('id')->on('teams')->onDelete('cascade');
});
}

public function down()
{
Schema::dropIfExists('team_invitations');
}
}

0 comments on commit 1718929

Please sign in to comment.