2018-06-07 23:46:40 +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-07 23:46:40 +09:00
|
|
|
|
|
|
|
class CreateMetadataTable extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::create('metadata', function (Blueprint $table) {
|
|
|
|
$table->string('url');
|
|
|
|
$table->string('title');
|
|
|
|
$table->string('description');
|
|
|
|
$table->string('image');
|
|
|
|
$table->timestamps();
|
|
|
|
|
|
|
|
$table->index('url');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('metadata');
|
|
|
|
}
|
|
|
|
}
|