2022-03-05 16:02:12 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
|
|
class CreateYabsTable extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::create('yabs', function (Blueprint $table) {
|
2022-03-05 16:58:25 +01:00
|
|
|
$table->char('id', 8)->primary();
|
2022-03-05 16:02:12 +01:00
|
|
|
$table->char('server_id', 8);
|
|
|
|
$table->boolean('has_ipv6')->default(false);
|
|
|
|
$table->boolean('aes')->default(false);
|
|
|
|
$table->boolean('vm')->default(false);
|
|
|
|
$table->dateTime('output_date');
|
|
|
|
$table->tinyInteger('cpu_cores');
|
|
|
|
$table->float('cpu_freq');
|
2022-03-05 16:58:25 +01:00
|
|
|
$table->string('cpu_model');
|
2022-03-05 16:02:12 +01:00
|
|
|
$table->float('ram');
|
|
|
|
$table->char('ram_type', 2);
|
|
|
|
$table->float('ram_mb');
|
|
|
|
$table->float('disk');
|
|
|
|
$table->char('disk_type', 2);
|
|
|
|
$table->float('disk_gb');
|
|
|
|
$table->integer('gb5_single');
|
|
|
|
$table->integer('gb5_multi');
|
|
|
|
$table->integer('gb5_id');
|
|
|
|
$table->timestamps();
|
2022-03-07 03:25:32 +01:00
|
|
|
$table->unique(['id','server_id'], 'yabs_u1');
|
2022-03-05 16:02:12 +01:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('yabs');
|
|
|
|
}
|
|
|
|
}
|