2023-04-07 05:48:13 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
2023-04-08 10:13:22 -04:00
|
|
|
class CreateBlueprintTable extends Migration
|
2023-04-07 05:48:13 -04:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
2023-04-08 15:31:20 -04:00
|
|
|
Schema::dropIfExists('blueprint');
|
2023-04-07 05:48:13 -04:00
|
|
|
Schema::create('blueprint', function (Blueprint $table) {
|
|
|
|
$table->id();
|
2023-08-29 07:14:35 -04:00
|
|
|
$table->timestamp('timestamp')->useCurrent()->onUpdate(null);
|
|
|
|
|
2023-04-09 15:15:11 -04:00
|
|
|
|
2023-08-29 07:14:35 -04:00
|
|
|
/*
|
|
|
|
Placeholder may come useful when developing
|
|
|
|
new features, that's why it's currently included
|
|
|
|
in the migrations.
|
2023-09-16 05:40:54 -04:00
|
|
|
|
|
|
|
This value will normally contain next to nothing,
|
|
|
|
but is always useful to include for experimenting.
|
2023-08-29 07:14:35 -04:00
|
|
|
*/
|
2023-07-12 05:12:09 -04:00
|
|
|
$table->string('placeholder')->nullable();
|
2023-08-29 07:14:35 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
Database value for keeping track of the developer
|
|
|
|
mode setting.
|
|
|
|
*/
|
2023-07-12 05:12:09 -04:00
|
|
|
$table->string('developer')->nullable();
|
2023-08-29 07:14:35 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
Database value for keeping track of the telemetry
|
|
|
|
opt-out option.
|
|
|
|
*/
|
2023-04-11 14:47:38 -04:00
|
|
|
$table->string('telemetry')->nullable();
|
2023-08-29 07:14:35 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
Randomly generated ID for the panel to use when
|
|
|
|
sending telemetry messages.
|
|
|
|
*/
|
2023-05-31 04:40:03 -04:00
|
|
|
$table->string('panel:id')->nullable();
|
2023-08-29 07:14:35 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
Cache of the previous version name for Blueprint
|
|
|
|
know when to reroll the panel ID and to know when
|
|
|
|
it has updated.
|
|
|
|
*/
|
2023-05-31 08:29:48 -04:00
|
|
|
$table->string('version:cache')->nullable();
|
2023-04-24 11:34:02 -04:00
|
|
|
|
2023-08-29 07:14:35 -04:00
|
|
|
/*
|
|
|
|
String for the notification API in Blueprint. Not
|
|
|
|
sure if I'm still using this value, so it might
|
|
|
|
get removed in the future.
|
|
|
|
*/
|
|
|
|
$table->string('notification:text')->nullable();
|
2023-04-07 05:48:13 -04:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('blueprint');
|
|
|
|
}
|
|
|
|
}
|