fanatic/database/migrations/10_create_joined_table.php
2022-04-23 16:25:16 -07:00

39 lines
820 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('joined', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->foreignId('collective_id')
->constrained('collectives')
->onUpdate('cascade')
->onDelete('cascade');
$table->string('url');
$table->string('subject');
$table->string('image');
$table->boolean('approved');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('joined');
}
};