Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/database/migrations/2016_02_27_163411_add_tasks_table.php
7460 views
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class AddTasksTable extends Migration
8
{
9
/**
10
* Run the migrations.
11
*/
12
public function up(): void
13
{
14
Schema::create('tasks', function (Blueprint $table) {
15
$table->increments('id');
16
$table->integer('server')->unsigned();
17
$table->tinyInteger('active')->default(1);
18
$table->string('action');
19
$table->text('data');
20
$table->tinyInteger('queued')->unsigned()->default(0);
21
$table->string('year')->default('*');
22
$table->string('day_of_week')->default('*');
23
$table->string('month')->default('*');
24
$table->string('day_of_month')->default('*');
25
$table->string('hour')->default('*');
26
$table->string('minute')->default('*');
27
$table->timestamp('last_run')->nullable();
28
$table->timestamp('next_run')->nullable();
29
$table->timestamps();
30
});
31
}
32
33
/**
34
* Reverse the migrations.
35
*/
36
public function down(): void
37
{
38
Schema::drop('tasks');
39
}
40
}
41
42