Hi, have you found a solution?
Sep 29, 2016
2
Level 1
Lumen Queue dispatch error with pgsql driver only
In Laravel Queue dispatch is working fine with pgsql, but in Lumen Queue dispatch though an error with pgsql. But Lumen queue same code works well with mysql.
DB_CONNECTION=pgsql ---- works well with mysql (no error with mysql driver)
QUEUE_DRIVER=database Lumen(5.3) Queue DB error :
SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "reserved" violates not-null constraint DETAIL: Failing row contains (6, default, {"job":"Illuminate\Queue\CallQueuedHandler@call","data":{"comm..., 0, null, null, 1475202214, 1475202214).)
Jobs
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']);
});
Schema::create('failed_jobs',function(Blueprint $table){
$table->bigIncrements('id');
$table->string('connection');
$table->string('queue');
$table->string('payload');
$table->string('exception');
$table->timestamp('failed_at');
});
Please or to participate in this conversation.