<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class RecreateMetadataTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::dropIfExists('metadata'); Schema::create('metadata', function (Blueprint $table) { $table->text('url'); $table->text('title'); $table->text('description'); $table->text('image'); $table->timestamps(); $table->index('url'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('metadata'); } }