for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?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->id();
$table->string('code')->unique();
$table->string('name')->unique();
$table->string('slug')->unique();
$table->longText('description');
$table->boolean('single_day')->default(1);
$table->dateTime('event_date')->nullable();
$table->dateTime('start_date')->nullable();
$table->dateTime('end_date')->nullable();
$table->string('interval')->nullable();
$table->string('notice')->nullable();
$table->string('image')->nullable();
$table->foreignId('gallery_id')->nullable()->constrained()->nullOnDelete();
$table->string('meta_name')->nullable();
$table->string('meta_description')->nullable();
$table->string('meta_keywords')->nullable();
$table->timestamps();
});
}
* Reverse the migrations.
public function down()
Schema::dropIfExists('events');