web/database/migrations/2022_01_09_205341_create_ba...

38 lines
921 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('badges', function (Blueprint $table) {
$table->id();
$table->string('name', 100)->default('New Badge');
$table->string('description', 2000)->default('Earn this badge from my game.');
$table->bigInteger('creator_id');
$table->bigInteger('game_id');
$table->boolean('awardable')->default(0);
$table->boolean('approved')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('badges');
}
};