38 lines
780 B
PHP
38 lines
780 B
PHP
|
<?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');
|
||
|
}
|
||
|
}
|