File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use Leaf\Database;
4+ use Illuminate\Database\Schema\Blueprint;
5+
6+ class CreateJobs extends Database
7+ {
8+ /**
9+ * Run the migrations.
10+ * @return void
11+ */
12+ public function up()
13+ {
14+ if (!static::$capsule::schema()->hasTable(_env('QUEUE_TABLE', 'leafphp_queue_jobs'))) :
15+ static::$capsule::schema()->create(_env('QUEUE_TABLE', 'leafphp_queue_jobs'), function (Blueprint $table) {
16+ $table->increments('id');
17+ $table->string('class');
18+ $table->text('config');
19+ $table->string('status')->default('pending');
20+ $table->integer('retry_count')->default(0);
21+ $table->timestamps();
22+ });
23+ endif;
24+ }
25+
26+ /**
27+ * Reverse the migrations.
28+ * @return void
29+ */
30+ public function down()
31+ {
32+ static::$capsule::schema()->dropIfExists(_env('QUEUE_TABLE', 'leafphp_queue_jobs'));
33+ }
34+ }
You can’t perform that action at this time.
0 commit comments