remove unnecessary columns and tables

This commit is contained in:
b1ek 2024-09-17 22:49:44 +10:00
parent 0d08781d63
commit 86c582d273
Signed by: blek
GPG Key ID: A622C22C9BC616B2
2 changed files with 2 additions and 17 deletions

View File

@ -18,8 +18,6 @@ class User extends Authenticatable
*/
protected $fillable = [
'name',
'email',
'password',
];
/**
@ -28,7 +26,6 @@ class User extends Authenticatable
* @var array<int, string>
*/
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 [];
}
}

View File

@ -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');
}
};