Permalink
Browse files

建立 jobs table

  • Loading branch information...
1 parent 9402ace commit 70868c78471097febf2e5ea0a2dbbc5aa16ede0d Sam.IO.Hsiao committed Nov 24, 2016
Binary file not shown.
@@ -0,0 +1,37 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateJobsTable extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::create('jobs', function (Blueprint $table) {
+ $table->bigIncrements('id');
+ $table->string('queue');
+ $table->longText('payload');
+ $table->tinyInteger('attempts')->unsigned();
+ $table->tinyInteger('reserved')->unsigned();
+ $table->unsignedInteger('reserved_at')->nullable();
+ $table->unsignedInteger('available_at');
+ $table->unsignedInteger('created_at');
+ $table->index(['queue', 'reserved', 'reserved_at']);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::drop('jobs');
+ }
+}

0 comments on commit 70868c7

Please sign in to comment.