mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 23:03:45 +02:00
Start push of service changes.
Changes the way service files are stored and allows for much easier updates in the future that won’t affect custom services. Also stores more configurations in the database to make life easier for everyone.
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddNewServiceOptionsColumns extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
DB::transaction(function() {
|
||||
Schema::table('service_options', function (Blueprint $table) {
|
||||
$table->dropColumn('executable');
|
||||
|
||||
$table->unsignedInteger('config_from')->nullable()->after('docker_image');
|
||||
$table->string('config_stop')->nullable()->after('docker_image');
|
||||
$table->text('config_logs')->nullable()->after('docker_image');
|
||||
$table->text('config_startup')->nullable()->after('docker_image');
|
||||
$table->text('config_files')->nullable()->after('docker_image');
|
||||
|
||||
$table->foreign('config_from')->references('id')->on('service_options');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
DB::transaction(function() {
|
||||
Schema::table('service_options', function (Blueprint $table) {
|
||||
$table->dropForeign('config_from');
|
||||
|
||||
$table->dropColumn('config_from');
|
||||
$table->dropColumn('config_stop');
|
||||
$table->dropColumn('config_logs');
|
||||
$table->dropColumn('config_startup');
|
||||
$table->dropColumn('config_files');
|
||||
|
||||
$table->string('executable')->after('docker_image')->nullable();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user