feat: more API endpoints
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
<?php
|
||||
|
||||
use App\Models\EnvironmentVariable;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Visus\Cuid2\Cuid2;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
@@ -16,6 +18,18 @@ return new class extends Migration
|
||||
$table->dropColumn('docker_compose_pr');
|
||||
$table->dropColumn('docker_compose_pr_raw');
|
||||
});
|
||||
Schema::table('environment_variables', function (Blueprint $table) {
|
||||
$table->string('uuid')->nullable()->after('id');
|
||||
});
|
||||
|
||||
EnvironmentVariable::all()->each(function (EnvironmentVariable $environmentVariable) {
|
||||
$environmentVariable->update([
|
||||
'uuid' => (string) new Cuid2(),
|
||||
]);
|
||||
});
|
||||
Schema::table('environment_variables', function (Blueprint $table) {
|
||||
$table->string('uuid')->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -28,5 +42,9 @@ return new class extends Migration
|
||||
$table->longText('docker_compose_pr')->nullable()->after('docker_compose_location');
|
||||
$table->longText('docker_compose_pr_raw')->nullable()->after('docker_compose');
|
||||
});
|
||||
Schema::table('environment_variables', function (Blueprint $table) {
|
||||
$table->dropColumn('uuid');
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user