1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-22 15:55:14 +00:00

Add update_settings_table migration to add optional profile following/follower counts

This commit is contained in:
Daniel Supernault 2018-08-21 21:17:22 -06:00
parent 526f67f84d
commit 08f2a4be9e
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -0,0 +1,36 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class UpdateSettingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('user_settings', function (Blueprint $table) {
$table->boolean('show_profile_followers')->default(true);
$table->boolean('show_profile_follower_count')->default(true);
$table->boolean('show_profile_following')->default(true);
$table->boolean('show_profile_following_count')->default(true);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
$table->dropColumn('show_profile_followers');
$table->dropColumn('show_profile_follower_count');
$table->dropColumn('show_profile_following');
$table->dropColumn('show_profile_following_count');
}
}