planifibo7/database/migrations/2021_07_14_222831_create_ev...

34 lines
748 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateEventosTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('eventos', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->string("nombre");
$table->boolean("abierto")->default(true); //true indica que se pueden agregar nuevas disponibilidades, false que no.
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('eventos');
}
}