tissue/database/migrations/2018_06_08_014226_recreate_metadata_table.php

38 lines
780 B
PHP
Raw Normal View History

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
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');
}
}