forged-plugs/billing/database/migrations/002_create_customers_table.php
Pelican Installer Bot a43d377930 feat: forged-plugs — 17 plugins for Forge Panel
Separated from pelican-dev/plugins, rebranded for Forge.
Includes manifest.json for in-panel store browsing.
2026-05-17 13:43:33 +00:00

26 lines
730 B
PHP

<?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('customers', function (Blueprint $table) {
$table->increments('id');
$table->string('first_name');
$table->string('last_name');
$table->integer('balance')->default(0);
$table->unsignedInteger('user_id');
$table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('customers');
}
};