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

@ -1,5 +1,9 @@
# Changelog
## Version {next}
- Adding jsonb column to store webmentions mf2.
* As of L5.2 this needs a custom command to drop NOT NULL from content, L5.3 should allow a fix for this
## Version 0.0.8.5 (2016-07-18)
- Set the size of the textarea in a form better
- Update to latest Guzzle to fix CVE-2016-5385

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');
});
}
}