いいね秘匿用のフラグ users.private_likes の追加

This commit is contained in:
shibafu 2019-04-09 22:47:18 +09:00
parent e9c1726567
commit 664448b9fc
2 changed files with 33 additions and 0 deletions

View File

@ -20,6 +20,7 @@ class User extends Authenticatable
'is_protected', 'accept_analytics', 'is_protected', 'accept_analytics',
'display_name', 'description', 'display_name', 'description',
'twitter_id', 'twitter_name', 'twitter_id', 'twitter_name',
'private_likes',
]; ];
/** /**

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddPrivateLikesToUsers extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->boolean('private_likes')->default(false);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('private_likes');
});
}
}