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(); + }); + } +];