mirror of
https://github.com/pterodactyl/panel.git
synced 2026-11-30 11:25:52 -05:00
Co-authored-by: Anthony <anthony@infraly.co> Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
34 lines
864 B
PHP
34 lines
864 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class AddCopyScriptFromColumn extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
Schema::table('service_options', function (Blueprint $table): void {
|
|
$table->unsignedInteger('copy_script_from')->nullable()->after('script_container');
|
|
|
|
$table->foreign('copy_script_from')->references('id')->on('service_options');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::table('service_options', function (Blueprint $table): void {
|
|
$table->dropForeign(['copy_script_from']);
|
|
$table->dropColumn('copy_script_from');
|
|
});
|
|
}
|
|
}
|