Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/database/migrations/2016_01_23_200648_add_nodes.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 AddNodes extends Migration
8
{
9
/**
10
* Run the migrations.
11
*/
12
public function up(): void
13
{
14
Schema::create('nodes', function (Blueprint $table) {
15
$table->increments('id');
16
$table->smallInteger('public')->unsigned();
17
$table->string('name');
18
$table->mediumInteger('location')->unsigned();
19
$table->string('fqdn');
20
$table->string('scheme')->default('https');
21
$table->integer('memory')->unsigned();
22
$table->mediumInteger('memory_overallocate')->unsigned()->nullable();
23
$table->integer('disk')->unsigned();
24
$table->mediumInteger('disk_overallocate')->unsigned()->nullable();
25
$table->char('daemonSecret', 36)->unique();
26
$table->smallInteger('daemonListen')->unsigned()->default(8080);
27
$table->smallInteger('daemonSFTP')->unsigned()->default(2022);
28
$table->string('daemonBase')->default('/home/daemon-files');
29
$table->timestamps();
30
});
31
}
32
33
/**
34
* Reverse the migrations.
35
*/
36
public function down(): void
37
{
38
Schema::dropIfExists('nodes');
39
}
40
}
41
42