c3lf-system-3/database/migrations/2019_11_14_213133_create_events_table.php

42 lines
1,012 B
PHP
Raw Normal View History

2019-11-15 20:57:07 +00:00
<?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) {
2019-11-28 03:52:53 +00:00
$table->charset = 'utf8';
$table->collation = 'utf8_unicode_ci';
2019-11-15 20:57:07 +00:00
$table->bigIncrements('eid');
$table->string('name');
2019-11-28 03:52:53 +00:00
$table->string('slug');
2019-11-15 20:57:07 +00:00
$table->timestamps();
2019-11-28 03:52:53 +00:00
$table->timestamp('start')->nullable();
$table->timestamp('end')->nullable();
$table->timestamp('pre_start')->nullable();
$table->timestamp('post_end')->nullable();
$table->unique('slug','uslug');
2019-11-15 20:57:07 +00:00
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('events');
}
}