parfum/database/migrations/2025_10_28_150511_create_whatsapps_table.php

32 lines
781 B
PHP

<?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('whatsapps', function (Blueprint $table) {
$table->id();
$table->string('zawa_id', 100);
$table->string('session_id', 100);
$table->text('qr_code')->nullable();
$table->timestamp('created_at')->useCurrent();
$table->timestamp('updated_at')->useCurrent()->useCurrentOnUpdate();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('whatsapps');
}
};