2023_12_03_195641_create_jobs_table.php 814 B

1234567891011121314151617181920212223242526272829303132
  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('jobs', function (Blueprint $table) {
  13. $table->bigIncrements('id');
  14. $table->string('queue')->index();
  15. $table->longText('payload');
  16. $table->unsignedTinyInteger('attempts');
  17. $table->unsignedInteger('reserved_at')->nullable();
  18. $table->unsignedInteger('available_at');
  19. $table->unsignedInteger('created_at');
  20. });
  21. }
  22. /**
  23. * Reverse the migrations.
  24. */
  25. public function down(): void
  26. {
  27. Schema::dropIfExists('jobs');
  28. }
  29. };