Files
MyX/database/migrations/2024_11_05_163640_create_contests_table.php

44 lines
1.1 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.
*
* @return void
*/
public function up()
{
Schema::create('contests', function (Blueprint $table) {
$table->id();
$table->foreignId('category_id')->index()->nullable();
$table->foreignId('organizer_id')->index()->nullable();
$table->string('name');
$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.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contests');
}
};