Improve scheduled task layout and data handling
This commit is contained in:
parent
c1301c7190
commit
67d9f9f4ab
11 changed files with 639 additions and 0 deletions
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddNullableFieldLastrun extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$table = DB::getQueryGrammar()->wrapTable('tasks');
|
||||
DB::statement('ALTER TABLE '.$table.' CHANGE `last_run` `last_run` TIMESTAMP NULL;');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
$table = DB::getQueryGrammar()->wrapTable('tasks');
|
||||
DB::statement('ALTER TABLE '.$table.' CHANGE `last_run` `last_run` TIMESTAMP;');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue