<?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('kaalii_package_versions', function (Blueprint $table) {
            $table->id();
            $table->string('tech_stack', 50);
            $table->string('version', 50)->unique();
            $table->longText('file_base64'); // base64-encoded zip
            $table->enum('status', ['draft', 'published', 'archived'])->default('draft');
            $table->timestamps();
        });
    }

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

};
