remove compose file to another repo
This commit is contained in:
51
database/migrations/2025_04_28_110000_create_users_table.php
Normal file
51
database/migrations/2025_04_28_110000_create_users_table.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?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::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('full_name');
|
||||
$table->string('username')->unique();
|
||||
$table->string('phone_number')->unique();
|
||||
$table->string('national_id')->unique();
|
||||
$table->string('position');
|
||||
$table->string('avatar')->nullable();
|
||||
$table->enum('gender', [1 => 'female', 2 => 'male'])->nullable();
|
||||
$table->string('password');
|
||||
$table->foreignId('province_id')->constrained('provinces');
|
||||
$table->string('province_fa');
|
||||
$table->string('email')->unique()->nullable();
|
||||
$table->dateTime('last_login')->nullable();
|
||||
$table->string('telephone_id')->unique();
|
||||
$table->rememberToken()->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('sessions', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->foreignId('user_id')->nullable()->index();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
$table->text('user_agent')->nullable();
|
||||
$table->longText('payload');
|
||||
$table->integer('last_activity')->index();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
Schema::dropIfExists('sessions');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user