kopia lustrzana https://github.com/pixelfed/pixelfed
				
				
				
			Update User model, add notify_enabled
							rodzic
							
								
									df5a9f2659
								
							
						
					
					
						commit
						141fc77be9
					
				| 
						 | 
				
			
			@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		|||
use Illuminate\Foundation\Auth\User as Authenticatable;
 | 
			
		||||
use Illuminate\Notifications\Notifiable;
 | 
			
		||||
use Laravel\Passport\HasApiTokens;
 | 
			
		||||
use NotificationChannels\Expo\ExpoPushToken;
 | 
			
		||||
use NotificationChannels\WebPush\HasPushSubscriptions;
 | 
			
		||||
 | 
			
		||||
class User extends Authenticatable
 | 
			
		||||
| 
						 | 
				
			
			@ -46,6 +45,7 @@ class User extends Authenticatable
 | 
			
		|||
        'last_active_at',
 | 
			
		||||
        'register_source',
 | 
			
		||||
        'expo_token',
 | 
			
		||||
        'notify_enabled',
 | 
			
		||||
        'notify_like',
 | 
			
		||||
        'notify_follow',
 | 
			
		||||
        'notify_mention',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,28 @@
 | 
			
		|||
<?php
 | 
			
		||||
 | 
			
		||||
use Illuminate\Database\Migrations\Migration;
 | 
			
		||||
use Illuminate\Database\Schema\Blueprint;
 | 
			
		||||
use Illuminate\Support\Facades\Schema;
 | 
			
		||||
 | 
			
		||||
return new class extends Migration
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * Run the migrations.
 | 
			
		||||
     */
 | 
			
		||||
    public function up(): void
 | 
			
		||||
    {
 | 
			
		||||
        Schema::table('users', function (Blueprint $table) {
 | 
			
		||||
            $table->boolean('notify_enabled')->default(false);
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Reverse the migrations.
 | 
			
		||||
     */
 | 
			
		||||
    public function down(): void
 | 
			
		||||
    {
 | 
			
		||||
        Schema::table('users', function (Blueprint $table) {
 | 
			
		||||
            $table->dropColumn('notify_enabled');
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
		Ładowanie…
	
		Reference in New Issue