id(); $table->string('type'); $table->string('display_name'); $table->timestamps(); }); Schema::create('users', function (Blueprint $table) { $table->id(); $table->foreignId('party_id')->nullable()->constrained('parties')->nullOnDelete(); $table->string('name'); $table->string('email')->unique(); $table->timestamp('email_verified_at')->nullable(); $table->string('password'); $table->string('status')->default('aktiv'); $table->timestamp('confirmed_adult_at')->nullable(); $table->text('app_authentication_secret')->nullable(); $table->text('app_authentication_recovery_codes')->nullable(); $table->rememberToken(); $table->timestamps(); }); Schema::create('profiles', function (Blueprint $table) { $table->id(); $table->foreignId('party_id')->unique()->constrained('parties')->cascadeOnDelete(); $table->string('display_name')->nullable(); $table->json('visibility'); $table->timestamps(); }); Schema::create('staff_role_assignments', function (Blueprint $table) { $table->id(); $table->foreignId('user_id')->constrained()->cascadeOnDelete(); $table->string('role'); $table->timestamps(); $table->unique(['user_id', 'role']); }); 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(); $table->string('ip_address', 45)->nullable(); $table->text('user_agent')->nullable(); $table->longText('payload'); $table->integer('last_activity')->index(); }); } public function down(): void { Schema::dropIfExists('sessions'); Schema::dropIfExists('password_reset_tokens'); Schema::dropIfExists('staff_role_assignments'); Schema::dropIfExists('profiles'); Schema::dropIfExists('users'); Schema::dropIfExists('parties'); } };