2018-06-08 01:44:39 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
2019-01-15 00:05:01 +09:00
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
2018-06-08 01:44:39 +09:00
|
|
|
|
|
|
|
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');
|
|
|
|
}
|
|
|
|
}
|