id(); $table->foreignId('scenario_id')->constrained()->onDelete('cascade'); $table->string('name'); $table->integer('priority')->comment('Lower number = higher priority, 1 = first'); $table->integer('sort_order')->default(0)->comment('For UI display ordering'); $table->enum('allocation_type', ['fixed_limit', 'percentage', 'unlimited']); $table->decimal('allocation_value', 10, 2)->nullable() ->comment('Limit amount for fixed_limit, percentage for percentage type, NULL for unlimited'); $table->timestamps(); // Indexes for performance $table->index(['scenario_id', 'priority']); $table->unique(['scenario_id', 'priority'], 'unique_scenario_priority'); }); } public function down(): void { Schema::dropIfExists('buckets'); } };