fanatic/database/migrations/10_create_joined_table.php
2022-04-26 21:16:46 -07:00

34 lines
859 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.
*/
public function up()
{
Schema::create('joined', function (Blueprint $table) {
$table->id();
$table->timestamps(6);
$table->foreignId('collective_id')
->constrained('collectives')
->onUpdate('cascade')
->onDelete('cascade');
$table->string('url');
$table->string('subject');
$table->string('image')->nullable();
$table->boolean('approved');
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::dropIfExists('joined');
}
};