Files
admin/database/migrations/2023_03_18_033231_create_users_table.php
Husanjonazamov e0f1989655 classify admin
2026-02-24 12:52:01 +05:00

43 lines
1.3 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('users', static function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email');
$table->string('mobile')->nullable();
$table->timestamp('email_verified_at')->nullable();
$table->string('profile')->nullable();
$table->string('type')->comment('email/google/mobile');
$table->string('password');
$table->string('fcm_id');
$table->boolean('notification')->default(0);
$table->string('firebase_id')->nullable();
$table->text('address')->nullable();
$table->rememberToken();
$table->timestamps();
$table->softDeletes();
$table->unique(['firebase_id', 'type']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('users');
}
};