<?php #CodeGenerator Δ bd052e28ccb129b4a258987f90e2c23a Δ DYNAMICALLY GENERATED FILE - Do not modify this line! Remove it completely to protect the file from changes.
/**
 * Migration Class
 *
 * @version     1.0.$Revision:$
 * @version     SVN: $Id:$
 * @generated   2025-04-24 00:51:40
 * @package     bplan-base/globals
 * @subpackage  Migrations
 * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 * @copyright   Copyright (C) 2025 bplan-solutions GmbH & Co. KG <https://www.bplan-solutions.de/>
 * /Δ\
 */


use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;


/**
 * Migration Class
 *
 * @version     1.0.0 / 2025-04-24
 * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 */
return new class extends Migration
{


    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('password_reset_tokens');
        Schema::dropIfExists('sessions');

    } // down()


    /**
     * Run the migrations.
     */
    public function up(): void
    {
        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();
        });
    } // up()


};
