From a2a929a17ad107e64602a6e545e035d47f7f596e Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 7 Feb 2015 21:07:08 +1100 Subject: [PATCH] Create jobs table to replace internal cron queue driver --- UPGRADE.md | 4 +++ .../2013_10_01_000010_Db_Cron_Queue.php | 26 ------------------ .../migrations/2014_10_01_000010_Db_Jobs.php | 27 +++++++++++++++++++ 3 files changed, 31 insertions(+), 26 deletions(-) delete mode 100644 modules/system/database/migrations/2013_10_01_000010_Db_Cron_Queue.php create mode 100644 modules/system/database/migrations/2014_10_01_000010_Db_Jobs.php diff --git a/UPGRADE.md b/UPGRADE.md index a315e2a52..f8540cfd5 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -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() diff --git a/modules/system/database/migrations/2013_10_01_000010_Db_Cron_Queue.php b/modules/system/database/migrations/2013_10_01_000010_Db_Cron_Queue.php deleted file mode 100644 index 0720b97e8..000000000 --- a/modules/system/database/migrations/2013_10_01_000010_Db_Cron_Queue.php +++ /dev/null @@ -1,26 +0,0 @@ -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'); - } -} diff --git a/modules/system/database/migrations/2014_10_01_000010_Db_Jobs.php b/modules/system/database/migrations/2014_10_01_000010_Db_Jobs.php new file mode 100644 index 000000000..bb523e831 --- /dev/null +++ b/modules/system/database/migrations/2014_10_01_000010_Db_Jobs.php @@ -0,0 +1,27 @@ +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'); + } +}