30 lines
1021 B
PHP
30 lines
1021 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
Schema::create('addons', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->uuid('uuid')->unique();
|
|
$table->string('key')->unique(); // registry key, e.g. "ring"
|
|
$table->boolean('installed')->default(false);
|
|
$table->string('status')->default('disconnected'); // disconnected|connecting|connected|error
|
|
$table->text('status_detail')->nullable(); // last error / info line
|
|
// Encrypted at rest — holds the Ring refresh token and other secrets (never plaintext).
|
|
$table->text('config')->nullable();
|
|
$table->timestamp('connected_at')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('addons');
|
|
}
|
|
};
|