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