Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

2024_11_15_225714_create_adjustmentables_table.php 715B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. return new class extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. */
  10. public function up(): void
  11. {
  12. Schema::create('adjustmentables', function (Blueprint $table) {
  13. $table->id();
  14. $table->foreignId('adjustment_id')->constrained()->cascadeOnDelete();
  15. $table->morphs('adjustmentable');
  16. $table->index(['adjustmentable_id', 'adjustmentable_type']);
  17. });
  18. }
  19. /**
  20. * Reverse the migrations.
  21. */
  22. public function down(): void
  23. {
  24. Schema::dropIfExists('adjustmentables');
  25. }
  26. };