c3lf-system-3/database/migrations/2019_11_14_213133_create_events_table.php
2019-11-28 05:43:12 +01:00

41 lines
1,012 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateEventsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('events', function (Blueprint $table) {
$table->charset = 'utf8';
$table->collation = 'utf8_unicode_ci';
$table->bigIncrements('eid');
$table->string('name');
$table->string('slug');
$table->timestamps();
$table->timestamp('start')->nullable();
$table->timestamp('end')->nullable();
$table->timestamp('pre_start')->nullable();
$table->timestamp('post_end')->nullable();
$table->unique('slug','uslug');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('events');
}
}