From 84c7969a4eb71aad37cbff80f8b47f22f366c0ef Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Fri, 29 Jul 2016 14:22:49 +0100 Subject: [PATCH] Add an mf2 column to webemtnions, type `jsonb` --- changelog.md | 4 +++ ..._jsonb_mf2_column_to_webmentions_table.php | 33 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 database/migrations/2016_07_29_113150_add_jsonb_mf2_column_to_webmentions_table.php diff --git a/changelog.md b/changelog.md index f6b62544..4b8f3b2f 100644 --- a/changelog.md +++ b/changelog.md @@ -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 diff --git a/database/migrations/2016_07_29_113150_add_jsonb_mf2_column_to_webmentions_table.php b/database/migrations/2016_07_29_113150_add_jsonb_mf2_column_to_webmentions_table.php new file mode 100644 index 00000000..04ad6f0a --- /dev/null +++ b/database/migrations/2016_07_29_113150_add_jsonb_mf2_column_to_webmentions_table.php @@ -0,0 +1,33 @@ +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'); + }); + } +}