From 86c582d273abb7b9c48ff8af1f765a2f1cd06f7c Mon Sep 17 00:00:00 2001 From: b1ek Date: Tue, 17 Sep 2024 22:49:44 +1000 Subject: [PATCH] remove unnecessary columns and tables --- app/Models/User.php | 8 +------- .../0001_01_01_000000_create_users_table.php | 11 +---------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index def621f..cc5c19e 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -18,8 +18,6 @@ class User extends Authenticatable */ protected $fillable = [ 'name', - 'email', - 'password', ]; /** @@ -28,7 +26,6 @@ class User extends Authenticatable * @var array */ protected $hidden = [ - 'password', 'remember_token', ]; @@ -39,9 +36,6 @@ class User extends Authenticatable */ protected function casts(): array { - return [ - 'email_verified_at' => 'datetime', - 'password' => 'hashed', - ]; + return []; } } diff --git a/database/migrations/0001_01_01_000000_create_users_table.php b/database/migrations/0001_01_01_000000_create_users_table.php index 05fb5d9..ca26678 100644 --- a/database/migrations/0001_01_01_000000_create_users_table.php +++ b/database/migrations/0001_01_01_000000_create_users_table.php @@ -14,19 +14,11 @@ return new class extends Migration Schema::create('users', function (Blueprint $table) { $table->id(); $table->string('name'); - $table->string('email')->unique(); - $table->timestamp('email_verified_at')->nullable(); - $table->string('password'); + $table->bigInteger('balance')->default(0); $table->rememberToken(); $table->timestamps(); }); - Schema::create('password_reset_tokens', function (Blueprint $table) { - $table->string('email')->primary(); - $table->string('token'); - $table->timestamp('created_at')->nullable(); - }); - Schema::create('sessions', function (Blueprint $table) { $table->string('id')->primary(); $table->foreignId('user_id')->nullable()->index(); @@ -43,7 +35,6 @@ return new class extends Migration public function down(): void { Schema::dropIfExists('users'); - Schema::dropIfExists('password_reset_tokens'); Schema::dropIfExists('sessions'); } };