From caa63107ad6c0416503d60bdcffa781bffa967a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Klabbers?= Date: Tue, 9 Jul 2019 21:22:37 +0200 Subject: [PATCH] add migration to drop preferences column --- ...9_212000_change_users_drop_preferences.php | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 migrations/2019_07_09_212000_change_users_drop_preferences.php diff --git a/migrations/2019_07_09_212000_change_users_drop_preferences.php b/migrations/2019_07_09_212000_change_users_drop_preferences.php new file mode 100644 index 000000000..5335e72b6 --- /dev/null +++ b/migrations/2019_07_09_212000_change_users_drop_preferences.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Schema\Builder; + +return [ + 'up' => function (Builder $schema) { + $schema->table('posts', function (Blueprint $table) { + $table->dropColumn('preferences'); + }); + }, + + 'down' => function (Builder $schema) { + $schema->table('posts', function (Blueprint $table) { + $table->binary('preferences')->nullable(); + }); + } +];