mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-06-06 20:37:32 +00:00
51 lines
1.3 KiB
PHP
51 lines
1.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
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): void {
|
|
$table->uuid('id')->primary();
|
|
$table->string('name');
|
|
$table->string('email');
|
|
$table->timestamp('email_verified_at')->nullable();
|
|
$table->string('password')->nullable();
|
|
$table->rememberToken();
|
|
$table->boolean('is_placeholder')->default(false);
|
|
$table->foreignUuid('current_team_id')->nullable();
|
|
$table->string('profile_photo_path', 2048)->nullable();
|
|
$table->string('timezone');
|
|
$table->enum('week_start', [
|
|
'monday',
|
|
'tuesday',
|
|
'wednesday',
|
|
'thursday',
|
|
'friday',
|
|
'saturday',
|
|
'sunday',
|
|
]);
|
|
$table->timestamps();
|
|
|
|
$table->uniqueIndex('email')
|
|
->where('is_placeholder = false');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('users');
|
|
}
|
|
};
|