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-04-08 10:13:22 -04:00
|
|
|
$table->string('placeholder')->nullable(); // Used for work-in-progress options.
|
2023-04-09 15:15:11 -04:00
|
|
|
|
2023-04-08 15:31:20 -04:00
|
|
|
$table->string('developer')->nullable(); // Somehow I can't make it work with a boolean.
|
2023-04-09 15:15:11 -04:00
|
|
|
$table->string('developer:cmd')->nullable();
|
|
|
|
$table->string('developer:log')->nullable();
|
|
|
|
|
2023-04-10 05:23:12 -04:00
|
|
|
$table->string('api:endpoint')->nullable();
|
|
|
|
|
2023-04-11 14:47:38 -04:00
|
|
|
$table->string('telemetry')->nullable();
|
|
|
|
$table->string('telemetry:id')->nullable();
|
|
|
|
|
2023-04-07 05:48:13 -04:00
|
|
|
$table->timestamp('timestamp')->useCurrent()->onUpdate(null);
|
|
|
|
});
|
2023-04-08 10:13:22 -04:00
|
|
|
|
2023-04-08 15:31:20 -04:00
|
|
|
Schema::dropIfExists('bpkey');
|
2023-04-08 10:13:22 -04:00
|
|
|
Schema::create('bpkey', function (Blueprint $table) {$table->id();$table->string('k')->nullable();$table->boolean('v')->nullable();$table->timestamp('timestamp')->useCurrent()->onUpdate(null);});
|
2023-04-07 05:48:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('blueprint');
|
2023-04-08 10:13:22 -04:00
|
|
|
Schema::dropIfExists('bpkey');
|
2023-04-07 05:48:13 -04:00
|
|
|
}
|
|
|
|
}
|