Files
MyX/database/migrations/2024_08_10_153352_create_contests_table.php
2024-08-10 17:10:59 +02:00

39 lines
1.0 KiB
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(): void
{
Schema::create('contests', function (Blueprint $table) {
$table->id();
$table->foreignId('category_id')->index();
$table->foreignId('organizer_id')->index();
$table->mediumText('description')->nullable();
$table->string('picture')->nullable();
$table->string('url');
$table->string('tweetid');
$table->date('fin');
$table->string('nbretweet');
$table->string('nblike');
$table->string('nbreply');
$table->boolean('participated')->default(false);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('contests');
}
};