From 141fc77be99031527190349d081e1a6efd4df1ee Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 30 Sep 2024 00:57:36 -0600 Subject: [PATCH] Update User model, add notify_enabled --- app/User.php | 2 +- ...93322_add_notify_shares_to_users_table.php | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 database/migrations/2024_09_18_093322_add_notify_shares_to_users_table.php diff --git a/app/User.php b/app/User.php index 30b502308..086e4b0d8 100644 --- a/app/User.php +++ b/app/User.php @@ -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', diff --git a/database/migrations/2024_09_18_093322_add_notify_shares_to_users_table.php b/database/migrations/2024_09_18_093322_add_notify_shares_to_users_table.php new file mode 100644 index 000000000..54225d46a --- /dev/null +++ b/database/migrations/2024_09_18_093322_add_notify_shares_to_users_table.php @@ -0,0 +1,28 @@ +boolean('notify_enabled')->default(false); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('notify_enabled'); + }); + } +};