Add an mf2 column to webemtnions, type jsonb

This commit is contained in:
Jonny Barnes 2016-07-29 14:22:49 +01:00
parent bb16547942
commit 84c7969a4e
2 changed files with 37 additions and 0 deletions

View file

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddJsonbMf2ColumnToWebmentionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('webmentions', function (Blueprint $table) {
$table->jsonb('mf2')->nullable();
$table->index(['mf2']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('webmentions', function (Blueprint $table) {
$table->dropIndex(['mf2']);
$table->dropColumn('mf2');
});
}
}