Skip to content

Instantly share code, notes, and snippets.

@Cyberiaaxis
Created November 12, 2017 08:04
Show Gist options
  • Save Cyberiaaxis/0c14f8acac53efa9fa50a94da1f3d02e to your computer and use it in GitHub Desktop.
Save Cyberiaaxis/0c14f8acac53efa9fa50a94da1f3d02e to your computer and use it in GitHub Desktop.
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTopicsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('topics', function (Blueprint $table) {
$table->increments('id');
$table->string('title')->nullable();
$table->string('duration')->nullable();
$table->timestamps();
$table->softDeletes();
$table->index(['deleted_at']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('topics');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment