<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('red_data', function (Blueprint $table) {
            $table->id();
            $table->string('data')->unique(); // Used as a key, e.g., 'merchant_token'
            $table->text('val');              // The actual token string
            $table->timestamp('expire_on')->nullable();
            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('red_data');
    }
};
