Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/database/migrations/2016_01_23_201748_add_servers.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 AddServers extends Migration
8
{
9
/**
10
* Run the migrations.
11
*/
12
public function up(): void
13
{
14
Schema::create('servers', function (Blueprint $table) {
15
$table->increments('id');
16
$table->char('uuid', 36)->unique();
17
$table->char('uuidShort', 8)->unique();
18
$table->mediumInteger('node')->unsigned();
19
$table->string('name');
20
$table->tinyInteger('active')->unsigned();
21
$table->mediumInteger('owner')->unsigned();
22
$table->integer('memory')->unsigned();
23
$table->integer('swap')->unsigned();
24
$table->integer('disk')->unsigned();
25
$table->integer('io')->unsigned();
26
$table->integer('cpu')->unsigned();
27
$table->tinyInteger('oom_disabled')->unsigned()->default(0);
28
$table->string('ip');
29
$table->integer('port')->unsigned();
30
$table->mediumInteger('service')->unsigned();
31
$table->mediumInteger('option')->unsigned();
32
$table->text('startup');
33
$table->char('daemonSecret', 36)->unique();
34
$table->string('username')->unique();
35
$table->tinyInteger('installed')->unsigned()->default(0);
36
$table->timestamps();
37
});
38
}
39
40
/**
41
* Reverse the migrations.
42
*/
43
public function down(): void
44
{
45
Schema::dropIfExists('servers');
46
}
47
}
48
49