2026_01_24_100003_create_pricing_codes_table.php 678 B

12345678910111213141516171819202122232425262728293031
  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('pricing_codes', function (Blueprint $table) {
  13. $table->id();
  14. $table->string('code')->unique();
  15. $table->text('description')->nullable();
  16. $table->timestamps();
  17. $table->index('code');
  18. });
  19. }
  20. /**
  21. * Reverse the migrations.
  22. */
  23. public function down(): void
  24. {
  25. Schema::dropIfExists('pricing_codes');
  26. }
  27. };