mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Create jobs table to replace internal cron queue driver
This commit is contained in:
parent
5055adfab2
commit
a2a929a17a
@ -45,6 +45,10 @@ Optional things you can delete, if they do not contain anything custom.
|
||||
[DELETE] /storage/combiner
|
||||
[DELETE] /storage/twig
|
||||
|
||||
Tables that can be deleted:
|
||||
|
||||
Schema::dropIfExists('cron_queue');
|
||||
|
||||
### Removed config
|
||||
|
||||
cms.tempDir - use temp_path()
|
||||
|
@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class DbCronQueue extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('cron_queue', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->integer('delay')->default(0);
|
||||
$table->integer('status')->default(0);
|
||||
$table->integer('retries')->default(0);
|
||||
$table->text('payload')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('cron_queue');
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class DbJobs extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('jobs', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue');
|
||||
$table->text('payload');
|
||||
$table->tinyInteger('attempts')->unsigned();
|
||||
$table->tinyInteger('reserved')->unsigned();
|
||||
$table->unsignedInteger('reserved_at')->nullable();
|
||||
$table->unsignedInteger('available_at');
|
||||
$table->unsignedInteger('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('jobs');
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user