Path: blob/1.0-develop/database/migrations/2016_01_23_201748_add_servers.php
7460 views
<?php12use Illuminate\Support\Facades\Schema;3use Illuminate\Database\Schema\Blueprint;4use Illuminate\Database\Migrations\Migration;56class AddServers extends Migration7{8/**9* Run the migrations.10*/11public function up(): void12{13Schema::create('servers', function (Blueprint $table) {14$table->increments('id');15$table->char('uuid', 36)->unique();16$table->char('uuidShort', 8)->unique();17$table->mediumInteger('node')->unsigned();18$table->string('name');19$table->tinyInteger('active')->unsigned();20$table->mediumInteger('owner')->unsigned();21$table->integer('memory')->unsigned();22$table->integer('swap')->unsigned();23$table->integer('disk')->unsigned();24$table->integer('io')->unsigned();25$table->integer('cpu')->unsigned();26$table->tinyInteger('oom_disabled')->unsigned()->default(0);27$table->string('ip');28$table->integer('port')->unsigned();29$table->mediumInteger('service')->unsigned();30$table->mediumInteger('option')->unsigned();31$table->text('startup');32$table->char('daemonSecret', 36)->unique();33$table->string('username')->unique();34$table->tinyInteger('installed')->unsigned()->default(0);35$table->timestamps();36});37}3839/**40* Reverse the migrations.41*/42public function down(): void43{44Schema::dropIfExists('servers');45}46}474849