commit 08-2025

This commit is contained in:
Kevin Adametz 2025-08-12 18:01:59 +02:00
parent 9ae662f63e
commit 480fdc65ed
404 changed files with 65310 additions and 2600431 deletions

View file

@ -55,6 +55,7 @@ class CreateUsersTable extends Migration
$table->boolean('test_mode')->default(false);
$table->text('settings')->nullable();
$table->timestamp('pre_deleted_at')->nullable();
$table->timestamps();
$table->softDeletes();

View file

@ -0,0 +1,39 @@
<?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('customers', function (Blueprint $table) {
$table->id();
$table->string('name')->nullable(); // Optional
$table->string('email')->unique();
$table->unsignedInteger('shopping_user_id')->nullable();
$table->unsignedInteger('member_id')->nullable();
$table->unsignedInteger('number')->index()->nullable();
$table->char('language', 2)->nullable();
$table->char('mode', 4)->nullable();
$table->rememberToken(); // Wichtig für Auth::login()
$table->timestamps();
$table->foreign('shopping_user_id')->references('id')->on('shopping_users')->onDelete('set null');
$table->foreign('member_id')->references('id')->on('members')->onDelete('set null');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('customers');
}
};

View file

@ -0,0 +1,29 @@
<?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('otp_tokens', function (Blueprint $table) {
$table->string('email')->index();
$table->string('token'); // Speichere hier den HASH des Tokens!
$table->timestamp('expires_at');
$table->timestamp('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('otp_tokens');
}
};