Merge branch 'develop' into matthewpi/security-keys-backport

This commit is contained in:
Matthew Penner 2023-01-17 15:33:53 -07:00
commit f631ac1946
No known key found for this signature in database
1153 changed files with 25099 additions and 37002 deletions

View file

@ -27,6 +27,10 @@ class NodeFactory extends Factory
'public' => true,
'name' => 'FactoryNode_' . Str::random(10),
'fqdn' => $this->faker->unique()->ipv4,
'listen_port_http' => 8080,
'listen_port_sftp' => 2022,
'public_port_http' => 8080,
'public_port_sftp' => 2022,
'scheme' => 'http',
'behind_proxy' => false,
'memory' => 1024,
@ -36,9 +40,7 @@ class NodeFactory extends Factory
'upload_size' => 100,
'daemon_token_id' => Str::random(Node::DAEMON_TOKEN_ID_LENGTH),
'daemon_token' => Crypt::encrypt(Str::random(Node::DAEMON_TOKEN_LENGTH)),
'daemonListen' => 8080,
'daemonSFTP' => 2022,
'daemonBase' => '/var/lib/pterodactyl/volumes',
'daemon_base' => Node::DEFAULT_DAEMON_BASE,
];
}
}

View file

@ -37,7 +37,7 @@ class ServerFactory extends Factory
'io' => 500,
'cpu' => 0,
'threads' => null,
'oom_disabled' => 0,
'oom_killer' => true,
'startup' => '/bin/bash echo "hello world"',
'image' => 'foo/bar:latest',
'allocation_limit' => null,

View file

@ -29,8 +29,6 @@ class UserFactory extends Factory
'uuid' => Uuid::uuid4()->toString(),
'username' => $this->faker->userName . '_' . Str::random(10),
'email' => Str::random(32) . '@example.com',
'name_first' => $this->faker->firstName,
'name_last' => $this->faker->lastName,
'password' => $password ?: $password = bcrypt('password'),
'language' => 'en',
'root_admin' => false,

View file

@ -11,10 +11,6 @@ use Pterodactyl\Services\Eggs\Sharing\EggUpdateImporterService;
class EggSeeder extends Seeder
{
protected EggImporterService $importerService;
protected EggUpdateImporterService $updateImporterService;
/**
* @var string[]
*/
@ -29,15 +25,15 @@ class EggSeeder extends Seeder
* EggSeeder constructor.
*/
public function __construct(
EggImporterService $importerService,
EggUpdateImporterService $updateImporterService
private EggImporterService $importerService,
private EggUpdateImporterService $updateImporterService
) {
$this->importerService = $importerService;
$this->updateImporterService = $updateImporterService;
}
/**
* Run the egg seeder.
*
* @throws \JsonException
*/
public function run()
{
@ -51,6 +47,8 @@ class EggSeeder extends Seeder
/**
* Loop through the list of egg files and import them.
*
* @throws \JsonException
*/
protected function parseEggFiles(Nest $nest)
{
@ -75,7 +73,7 @@ class EggSeeder extends Seeder
$this->updateImporterService->handle($egg, $file);
$this->command->info('Updated ' . $decoded['name']);
} else {
$this->importerService->handle($file, $nest->id);
$this->importerService->handleFile($nest->id, $file);
$this->command->comment('Created ' . $decoded['name']);
}
}

View file

@ -4,7 +4,7 @@
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2022-06-17T08:11:14+03:00",
"exported_at": "2022-11-06T06:33:01-05:00",
"name": "Forge Minecraft",
"author": "support@pterodactyl.io",
"description": "Minecraft Forge Server. Minecraft Forge is a modding API (Application Programming Interface), which makes it easier to create mods, and also make sure mods are compatible with each other.",
@ -67,12 +67,12 @@
},
{
"name": "Forge Version",
"description": "Gets an exact version.\r\n\r\nEx. 1.15.2-31.2.4\r\n\r\nOverrides MC_VERSION and BUILD_TYPE. If it fails to download the server files it will fail to install.",
"description": "The full exact version.\r\n\r\nEx. 1.15.2-31.2.4\r\n\r\nOverrides MC_VERSION and BUILD_TYPE. If it fails to download the server files it will fail to install.",
"env_variable": "FORGE_VERSION",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|max:25",
"rules": "nullable|regex:\/^[0-9\\.\\-]+$\/",
"field_type": "text"
}
]

View file

@ -13,7 +13,7 @@
"ghcr.io\/pterodactyl\/yolks:debian"
],
"file_denylist": [],
"startup": ".\/ts3server default_voice_port={{SERVER_PORT}} query_port={{QUERY_PORT}} filetransfer_ip=0.0.0.0 filetransfer_port={{FILE_TRANSFER}} license_accepted=1",
"startup": ".\/ts3server default_voice_port={{SERVER_PORT}} query_port={{QUERY_PORT}} filetransfer_ip=0.0.0.0 filetransfer_port={{FILE_TRANSFER}} query_http_port={{QUERY_HTTP}} query_ssh_port={{QUERY_SSH}} query_protocols={{QUERY_PROTOCOLS_VAR}} license_accepted=1",
"config": {
"files": "{}",
"startup": "{\r\n \"done\": \"listening on 0.0.0.0:\"\r\n}",
@ -22,7 +22,7 @@
},
"scripts": {
"installation": {
"script": "#!\/bin\/ash\r\n# TS3 Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\nif [ -z ${TS_VERSION} ] || [ ${TS_VERSION} == latest ]; then\r\n TS_VERSION=$(curl -sSL https:\/\/teamspeak.com\/versions\/server.json | jq -r '.linux.x86_64.version')\r\nfi\r\n\r\ncd \/mnt\/server\r\n\r\necho -e \"getting files from http:\/\/files.teamspeak-services.com\/releases\/server\/${TS_VERSION}\/teamspeak3-server_linux_amd64-${TS_VERSION}.tar.bz2\" \r\ncurl -L http:\/\/files.teamspeak-services.com\/releases\/server\/${TS_VERSION}\/teamspeak3-server_linux_amd64-${TS_VERSION}.tar.bz2 | tar -xvj --strip-components=1",
"script": "#!\/bin\/ash\r\n# TS3 Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\nif [ -z ${TS_VERSION} ] || [ ${TS_VERSION} == latest ]; then\r\n TS_VERSION=$(curl -sSL https:\/\/teamspeak.com\/versions\/server.json | jq -r '.linux.x86_64.version')\r\nfi\r\n\r\ncd \/mnt\/server\r\n\r\necho -e \"getting files from http:\/\/files.teamspeak-services.com\/releases\/server\/${TS_VERSION}\/teamspeak3-server_linux_amd64-${TS_VERSION}.tar.bz2\" \r\ncurl -L http:\/\/files.teamspeak-services.com\/releases\/server\/${TS_VERSION}\/teamspeak3-server_linux_amd64-${TS_VERSION}.tar.bz2 | tar -xvj --strip-components=1\r\ncp .\/redist\/libmariadb.so.2 .\/",
"container": "ghcr.io\/pterodactyl\/installers:alpine",
"entrypoint": "ash"
}
@ -35,7 +35,8 @@
"default_value": "latest",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:6"
"rules": "required|string|max:6",
"field_type": "text"
},
{
"name": "File Transfer Port",
@ -44,7 +45,8 @@
"default_value": "30033",
"user_viewable": true,
"user_editable": false,
"rules": "required|integer|between:1,65535"
"rules": "required|integer|between:1025,65535",
"field_type": "text"
},
{
"name": "Query Port",
@ -53,7 +55,38 @@
"default_value": "10011",
"user_viewable": true,
"user_editable": false,
"rules": "required|integer|between:1,65535"
"rules": "required|integer|between:1025,65535",
"field_type": "text"
},
{
"name": "Query Protocols",
"description": "Comma separated list of protocols that can be used to connect to the ServerQuery | \r\nPossible values are raw, ssh and http | \r\nE.g.: raw,ssh,http",
"env_variable": "QUERY_PROTOCOLS_VAR",
"default_value": "raw,http,ssh",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:12",
"field_type": "text"
},
{
"name": "Query SSH Port",
"description": "TCP Port opened for ServerQuery connections using SSH",
"env_variable": "QUERY_SSH",
"default_value": "10022",
"user_viewable": true,
"user_editable": false,
"rules": "required|integer|between:1025,65535",
"field_type": "text"
},
{
"name": "Query HTTP Port",
"description": "TCP Port opened for ServerQuery connections using http",
"env_variable": "QUERY_HTTP",
"default_value": "10080",
"user_viewable": true,
"user_editable": false,
"rules": "required|integer|between:1025,65535",
"field_type": "text"
}
]
}
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddAllocationsTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('allocations', function (Blueprint $table) {
$table->increments('id');
@ -23,7 +24,7 @@ class AddAllocationsTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('allocations');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddApiKeys extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('api_keys', function (Blueprint $table) {
$table->increments('id');
@ -22,7 +23,7 @@ class AddApiKeys extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('api_keys');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddApiPermissions extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('api_permissions', function (Blueprint $table) {
$table->increments('id');
@ -20,7 +21,7 @@ class AddApiPermissions extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('api_permissions');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddDownloads extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('downloads', function (Blueprint $table) {
$table->increments('id');
@ -22,7 +23,7 @@ class AddDownloads extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('downloads');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class CreateFailedJobsTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('failed_jobs', function (Blueprint $table) {
$table->increments('id');
@ -22,7 +23,7 @@ class CreateFailedJobsTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('failed_jobs');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class CreateJobsTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('jobs', function (Blueprint $table) {
$table->bigIncrements('id');
@ -19,6 +20,7 @@ class CreateJobsTable extends Migration
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
$table->index(['queue', 'reserved', 'reserved_at']);
});
}
@ -26,7 +28,7 @@ class CreateJobsTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('jobs');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddLocations extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('locations', function (Blueprint $table) {
$table->increments('id');
@ -21,7 +22,7 @@ class AddLocations extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('locations');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddNodes extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('nodes', function (Blueprint $table) {
$table->increments('id');
@ -23,7 +24,7 @@ class AddNodes extends Migration
$table->mediumInteger('disk_overallocate')->unsigned()->nullable();
$table->char('daemonSecret', 36)->unique();
$table->smallInteger('daemonListen')->unsigned()->default(8080);
$table->smallInteger('daemonSFTP')->unsgined()->default(2022);
$table->smallInteger('daemonSFTP')->unsigned()->default(2022);
$table->string('daemonBase')->default('/home/daemon-files');
$table->timestamps();
});
@ -32,7 +33,7 @@ class AddNodes extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('nodes');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddPasswordResets extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->index();
@ -20,7 +21,7 @@ class AddPasswordResets extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('password_resets');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddPermissions extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('permissions', function (Blueprint $table) {
$table->increments('id');
@ -22,7 +23,7 @@ class AddPermissions extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('permissions');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddServerVariables extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('server_variables', function (Blueprint $table) {
$table->increments('id');
@ -22,7 +23,7 @@ class AddServerVariables extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('server_variables');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddServers extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('servers', function (Blueprint $table) {
$table->increments('id');
@ -39,7 +40,7 @@ class AddServers extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('servers');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddServiceOptions extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('service_options', function (Blueprint $table) {
$table->increments('id');
@ -24,7 +25,7 @@ class AddServiceOptions extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('service_options');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddServiceVaribles extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('service_variables', function (Blueprint $table) {
$table->increments('id');
@ -28,7 +29,7 @@ class AddServiceVaribles extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('service_variables');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddServices extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('services', function (Blueprint $table) {
$table->increments('id');
@ -24,7 +25,7 @@ class AddServices extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('services');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class CreateSettingsTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('settings', function (Blueprint $table) {
$table->string('key')->unique();
@ -19,7 +20,7 @@ class CreateSettingsTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('settings');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddSubusers extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('subusers', function (Blueprint $table) {
$table->increments('id');
@ -22,7 +23,7 @@ class AddSubusers extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('subusers');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddUsers extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
@ -27,7 +28,7 @@ class AddUsers extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('users');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class CreateSessionsTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->unique();
@ -23,7 +24,7 @@ class CreateSessionsTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::drop('sessions');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class RenamePermissionsColumn extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('permissions', function (Blueprint $table) {
$table->renameColumn('permissions', 'permission');
@ -18,7 +19,7 @@ class RenamePermissionsColumn extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('permissions', function (Blueprint $table) {
});

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddDatabasesTables extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('databases', function (Blueprint $table) {
$table->increments('id');
@ -25,7 +26,7 @@ class AddDatabasesTables extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::drop('databases');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddDatabaseServersTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('database_servers', function (Blueprint $table) {
$table->increments('id');
@ -26,7 +27,7 @@ class AddDatabaseServersTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::drop('database_servers');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddServiceOptionDefaultStartup extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('service_options', function (Blueprint $table) {
$table->text('executable')->after('docker_image')->nullable()->default(null);
@ -19,7 +20,7 @@ class AddServiceOptionDefaultStartup extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('service_options', function (Blueprint $table) {
$table->dropColumn('executable');

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddUniqueServiceField extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('services', function (Blueprint $table) {
$table->string('file')->unique()->change();
@ -18,10 +19,10 @@ class AddUniqueServiceField extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('services', function (Blueprint $table) {
$table->dropUnique('services_file_unique');
$table->dropUnique(['file']);
});
}
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddTasksTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('tasks', function (Blueprint $table) {
$table->increments('id');
@ -32,7 +33,7 @@ class AddTasksTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::drop('tasks');
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddTasksLogTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('tasks_log', function (Blueprint $table) {
$table->increments('id');
@ -23,7 +24,7 @@ class AddTasksLogTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::drop('tasks_log');
}

View file

@ -1,24 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
class AddNullableFieldLastrun extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
$table = DB::getQueryGrammar()->wrapTable('tasks');
DB::statement('ALTER TABLE ' . $table . ' CHANGE `last_run` `last_run` TIMESTAMP NULL;');
}
/**
* Reverse the migrations.
*/
public function down()
{
$table = DB::getQueryGrammar()->wrapTable('tasks');
DB::statement('ALTER TABLE ' . $table . ' CHANGE `last_run` `last_run` TIMESTAMP;');
}
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddIpAlias extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('allocations', function (Blueprint $table) {
$table->text('ip_alias')->nullable()->after('ip');
@ -29,7 +30,7 @@ class AddIpAlias extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('allocations', function (Blueprint $table) {
$table->dropColumn('ip_alias');

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class ModifyIpStorageMethod extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->mediumInteger('allocation')->unsigned()->after('oom_disabled');
@ -47,7 +48,7 @@ class ModifyIpStorageMethod extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->text('ip')->after('allocation');

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddSuspensionForServers extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->tinyInteger('suspended')->unsigned()->default(0)->after('active');
@ -18,7 +19,7 @@ class AddSuspensionForServers extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->dropColumn('suspended');

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class RemoveActiveColumn extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->dropColumn('active');
@ -18,7 +19,7 @@ class RemoveActiveColumn extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->tinyInteger('active')->after('name')->unsigned()->default(0);

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class AddSftpPasswordStorage extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->text('sftp_password')->after('username')->nullable();
@ -18,7 +19,7 @@ class AddSftpPasswordStorage extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->dropColumn('sftp_password');

View file

@ -9,11 +9,12 @@ class UpdateJobsTables extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('jobs', function (Blueprint $table) {
$table->dropIndex('jobs_queue_reserved_reserved_at_index');
$table->dropIndex(['queue', 'reserved', 'reserved_at']);
$table->dropColumn('reserved');
$table->index(['queue', 'reserved_at']);
});
}
@ -21,10 +22,11 @@ class UpdateJobsTables extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('jobs', function (Blueprint $table) {
$table->dropIndex('jobs_queue_reserved_at_index');
$table->dropIndex(['queue', 'reserved_at']);
$table->tinyInteger('reserved')->unsigned();
$table->index(['queue', 'reserved', 'reserved_at']);
});

View file

@ -9,7 +9,7 @@ class UpdateFailedJobsTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('failed_jobs', function (Blueprint $table) {
$table->text('exception');
@ -19,7 +19,7 @@ class UpdateFailedJobsTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('failed_jobs', function (Blueprint $table) {
$table->dropColumn('exception');

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -8,7 +9,7 @@ class CreateNotificationsTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('notifications', function (Blueprint $table) {
$table->string('id')->primary();
@ -23,7 +24,7 @@ class CreateNotificationsTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::drop('notifications');
}

View file

@ -9,7 +9,7 @@ class AddUniqueIdentifier extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('services', function (Blueprint $table) {
$table->char('author', 36)->after('id');
@ -19,7 +19,7 @@ class AddUniqueIdentifier extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('services', function (Blueprint $table) {
$table->dropColumn('author');

View file

@ -9,7 +9,7 @@ class AllowLongerRegexField extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('service_variables', function (Blueprint $table) {
$table->text('regex')->change();
@ -19,7 +19,7 @@ class AllowLongerRegexField extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('service_variables', function (Blueprint $table) {
$table->string('regex')->change();

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -9,7 +10,7 @@ class AddDockerImageColumn extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->string('image')->after('daemonSecret');
@ -32,7 +33,7 @@ class AddDockerImageColumn extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->dropColumn('image');

View file

@ -9,7 +9,7 @@ class UpdateServersColumnName extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('databases', function (Blueprint $table) {
$table->renameColumn('server', 'server_id');
@ -19,7 +19,7 @@ class UpdateServersColumnName extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('databases', function (Blueprint $table) {
$table->renameColumn('server_id', 'server');

View file

@ -7,7 +7,7 @@ class RenameDoubleInsurgency extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
DB::transaction(function () {
$model = DB::table('service_options')->where('parent_service', 2)->where('id', 3)->where('name', 'Insurgency')->first();
@ -21,7 +21,7 @@ class RenameDoubleInsurgency extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
}
}

View file

@ -9,7 +9,7 @@ class BuildApiLogTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('api_logs', function (Blueprint $table) {
$table->increments('id');
@ -28,7 +28,7 @@ class BuildApiLogTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::drop('api_logs');
}

View file

@ -9,7 +9,7 @@ class UpdateApiKeys extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('api_keys', function (Blueprint $table) {
$table->unsignedInteger('user')->after('id');
@ -21,7 +21,7 @@ class UpdateApiKeys extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('api_keys', function (Blueprint $table) {
$table->dropColumn('user');

View file

@ -7,7 +7,7 @@ class UpdateMisnamedBungee extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
DB::table('service_variables')->select('env_variable')->where('env_variable', 'BUNGE_VERSION')->update([
'env_variable' => 'BUNGEE_VERSION',
@ -17,7 +17,7 @@ class UpdateMisnamedBungee extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
}
}

View file

@ -9,22 +9,21 @@ class AddForeignKeysServers extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
DB::statement('ALTER TABLE servers
MODIFY COLUMN node INT(10) UNSIGNED NOT NULL,
MODIFY COLUMN owner INT(10) UNSIGNED NOT NULL,
MODIFY COLUMN allocation INT(10) UNSIGNED NOT NULL,
MODIFY COLUMN service INT(10) UNSIGNED NOT NULL,
MODIFY COLUMN `option` INT(10) UNSIGNED NOT NULL
');
Schema::table('servers', function (Blueprint $table) {
$table->integer('node', false, true)->change();
$table->integer('owner', false, true)->change();
$table->integer('allocation', false, true)->change();
$table->integer('service', false, true)->change();
$table->integer('option', false, true)->change();
$table->foreign('node')->references('id')->on('nodes');
$table->foreign('owner')->references('id')->on('users');
$table->foreign('allocation')->references('id')->on('allocations');
$table->foreign('service')->references('id')->on('services');
$table->foreign('option')->references('id')->on('service_options');
$table->softDeletes();
});
}
@ -32,30 +31,31 @@ class AddForeignKeysServers extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->dropForeign('servers_node_foreign');
$table->dropForeign('servers_owner_foreign');
$table->dropForeign('servers_allocation_foreign');
$table->dropForeign('servers_service_foreign');
$table->dropForeign('servers_option_foreign');
$table->dropForeign(['node']);
$table->dropIndex(['node']);
$table->dropIndex('servers_node_foreign');
$table->dropIndex('servers_owner_foreign');
$table->dropIndex('servers_allocation_foreign');
$table->dropIndex('servers_service_foreign');
$table->dropIndex('servers_option_foreign');
$table->dropForeign(['owner']);
$table->dropIndex(['owner']);
$table->dropForeign(['allocation']);
$table->dropIndex(['allocation']);
$table->dropForeign(['service']);
$table->dropIndex(['service']);
$table->dropForeign(['option']);
$table->dropIndex(['option']);
$table->dropColumn('deleted_at');
});
DB::statement('ALTER TABLE servers
MODIFY COLUMN node MEDIUMINT(8) UNSIGNED NOT NULL,
MODIFY COLUMN owner MEDIUMINT(8) UNSIGNED NOT NULL,
MODIFY COLUMN allocation MEDIUMINT(8) UNSIGNED NOT NULL,
MODIFY COLUMN service MEDIUMINT(8) UNSIGNED NOT NULL,
MODIFY COLUMN `option` MEDIUMINT(8) UNSIGNED NOT NULL
');
$table->mediumInteger('node', false, true)->change();
$table->mediumInteger('owner', false, true)->change();
$table->mediumInteger('allocation', false, true)->change();
$table->mediumInteger('service', false, true)->change();
$table->mediumInteger('option', false, true)->change();
});
}
}

View file

@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
@ -9,14 +10,11 @@ class AddForeignAllocations extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
DB::statement('ALTER TABLE allocations
MODIFY COLUMN assigned_to INT(10) UNSIGNED NULL,
MODIFY COLUMN node INT(10) UNSIGNED NOT NULL
');
Schema::table('allocations', function (Blueprint $table) {
$table->integer('assigned_to', false, true)->nullable()->change();
$table->integer('node', false, true)->nullable(false)->change();
$table->foreign('assigned_to')->references('id')->on('servers');
$table->foreign('node')->references('id')->on('nodes');
});
@ -25,14 +23,17 @@ class AddForeignAllocations extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('allocations', function (Blueprint $table) {
$table->dropForeign('allocations_assigned_to_foreign');
$table->dropForeign('allocations_node_foreign');
$table->dropForeign(['assigned_to']);
$table->dropIndex(['assigned_to']);
$table->dropIndex('allocations_assigned_to_foreign');
$table->dropIndex('allocations_node_foreign');
$table->dropForeign(['node']);
$table->dropIndex(['node']);
$table->mediumInteger('assigned_to', false, true)->nullable()->change();
$table->mediumInteger('node', false, true)->nullable(false)->change();
});
DB::statement('ALTER TABLE allocations

View file

@ -9,7 +9,7 @@ class AddForeignApiKeys extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('api_keys', function (Blueprint $table) {
$table->foreign('user')->references('id')->on('users');
@ -19,11 +19,11 @@ class AddForeignApiKeys extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('api_keys', function (Blueprint $table) {
$table->dropForeign('api_keys_user_foreign');
$table->dropIndex('api_keys_user_foreign');
$table->dropForeign(['user']);
$table->dropIndex(['user']);
});
}
}

View file

@ -9,11 +9,10 @@ class AddForeignApiPermissions extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
DB::statement('ALTER TABLE api_permissions MODIFY key_id INT(10) UNSIGNED NOT NULL');
Schema::table('api_permissions', function (Blueprint $table) {
$table->integer('key_id', false, true)->nullable(false)->change();
$table->foreign('key_id')->references('id')->on('api_keys');
});
}
@ -21,13 +20,13 @@ class AddForeignApiPermissions extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('api_permissions', function (Blueprint $table) {
$table->dropForeign('api_permissions_key_id_foreign');
$table->dropIndex('api_permissions_key_id_foreign');
});
$table->dropForeign(['key_id']);
$table->dropIndex(['key_id']);
DB::statement('ALTER TABLE api_permissions MODIFY key_id MEDIUMINT(8) UNSIGNED NOT NULL');
$table->mediumInteger('key_id', false, true)->nullable(false)->change();
});
}
}

View file

@ -9,7 +9,7 @@ class AddForeignDatabaseServers extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('database_servers', function (Blueprint $table) {
$table->foreign('linked_node')->references('id')->on('nodes');
@ -19,11 +19,11 @@ class AddForeignDatabaseServers extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('database_servers', function (Blueprint $table) {
$table->dropForeign('database_servers_linked_node_foreign');
$table->dropIndex('database_servers_linked_node_foreign');
$table->dropForeign(['linked_node']);
$table->dropIndex(['linked_node']);
});
}
}

View file

@ -9,7 +9,7 @@ class AddForeignDatabases extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('databases', function (Blueprint $table) {
$table->foreign('server_id')->references('id')->on('servers');
@ -20,14 +20,14 @@ class AddForeignDatabases extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('databases', function (Blueprint $table) {
$table->dropForeign('databases_server_id_foreign');
$table->dropForeign('databases_db_server_foreign');
$table->dropForeign(['server_id']);
$table->dropIndex(['server_id']);
$table->dropIndex('databases_server_id_foreign');
$table->dropIndex('databases_db_server_foreign');
$table->dropForeign(['db_server']);
$table->dropIndex(['db_server']);
});
}
}

View file

@ -9,11 +9,10 @@ class AddForeignNodes extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
DB::statement('ALTER TABLE nodes MODIFY location INT(10) UNSIGNED NOT NULL');
Schema::table('nodes', function (Blueprint $table) {
$table->integer('location', false, true)->nullable(false)->change();
$table->foreign('location')->references('id')->on('locations');
});
}
@ -21,13 +20,13 @@ class AddForeignNodes extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('nodes', function (Blueprint $table) {
$table->dropForeign('nodes_location_foreign');
$table->dropIndex('nodes_location_foreign');
});
$table->dropForeign(['location']);
$table->dropIndex(['location']);
DB::statement('ALTER TABLE nodes MODIFY location MEDIUMINT(10) UNSIGNED NOT NULL');
$table->mediumInteger('location', false, true)->nullable(false)->change();
});
}
}

View file

@ -9,7 +9,7 @@ class AddForeignPermissions extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('permissions', function (Blueprint $table) {
$table->foreign('user_id')->references('id')->on('users');
@ -20,14 +20,14 @@ class AddForeignPermissions extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('permissions', function (Blueprint $table) {
$table->dropForeign('permissions_user_id_foreign');
$table->dropForeign('permissions_server_id_foreign');
$table->dropForeign(['user_id']);
$table->dropIndex(['user_id']);
$table->dropIndex('permissions_user_id_foreign');
$table->dropIndex('permissions_server_id_foreign');
$table->dropForeign(['server_id']);
$table->dropIndex(['server_id']);
});
}
}

View file

@ -9,14 +9,11 @@ class AddForeignServerVariables extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
DB::statement('ALTER TABLE server_variables
MODIFY COLUMN server_id INT(10) UNSIGNED NULL,
MODIFY COLUMN variable_id INT(10) UNSIGNED NOT NULL
');
Schema::table('server_variables', function (Blueprint $table) {
$table->integer('server_id', false, true)->nullable()->change();
$table->integer('variable_id', false, true)->nullable(false)->change();
$table->foreign('server_id')->references('id')->on('servers');
$table->foreign('variable_id')->references('id')->on('service_variables');
});
@ -25,16 +22,13 @@ class AddForeignServerVariables extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('server_variables', function (Blueprint $table) {
$table->dropForeign(['server_id']);
$table->dropForeign(['variable_id']);
$table->mediumInteger('server_id', false, true)->nullable()->change();
$table->mediumInteger('variable_id', false, true)->nullable(false)->change();
});
DB::statement('ALTER TABLE server_variables
MODIFY COLUMN server_id MEDIUMINT(8) UNSIGNED NULL,
MODIFY COLUMN variable_id MEDIUMINT(8) UNSIGNED NOT NULL
');
}
}

View file

@ -9,11 +9,10 @@ class AddForeignServiceOptions extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
DB::statement('ALTER TABLE service_options MODIFY parent_service INT(10) UNSIGNED NOT NULL');
Schema::table('service_options', function (Blueprint $table) {
$table->integer('parent_service', false, true)->change();
$table->foreign('parent_service')->references('id')->on('services');
});
}
@ -21,13 +20,13 @@ class AddForeignServiceOptions extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('service_options', function (Blueprint $table) {
$table->dropForeign('service_options_parent_service_foreign');
$table->dropIndex('service_options_parent_service_foreign');
});
$table->dropForeign(['parent_service']);
$table->dropIndex(['parent_service']);
DB::statement('ALTER TABLE service_options MODIFY parent_service MEDIUMINT(8) UNSIGNED NOT NULL');
$table->mediumInteger('parent_service', false, true)->change();
});
}
}

View file

@ -9,11 +9,10 @@ class AddForeignServiceVariables extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
DB::statement('ALTER TABLE service_variables MODIFY option_id INT(10) UNSIGNED NOT NULL');
Schema::table('service_variables', function (Blueprint $table) {
$table->integer('option_id', false, true)->change();
$table->foreign('option_id')->references('id')->on('service_options');
});
}
@ -21,13 +20,13 @@ class AddForeignServiceVariables extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('service_variables', function (Blueprint $table) {
$table->dropForeign('service_variables_option_id_foreign');
$table->dropIndex('service_variables_option_id_foreign');
});
$table->dropForeign(['option_id']);
$table->dropIndex(['option_id']);
DB::statement('ALTER TABLE service_variables MODIFY option_id MEDIUMINT(8) UNSIGNED NOT NULL');
$table->mediumInteger('option_id', false, true)->change();
});
}
}

View file

@ -9,7 +9,7 @@ class AddForeignSubusers extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('subusers', function (Blueprint $table) {
$table->foreign('user_id')->references('id')->on('users');
@ -20,14 +20,14 @@ class AddForeignSubusers extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('subusers', function (Blueprint $table) {
$table->dropForeign('subusers_user_id_foreign');
$table->dropForeign('subusers_server_id_foreign');
$table->dropForeign(['user_id']);
$table->dropIndex(['user_id']);
$table->dropIndex('subusers_user_id_foreign');
$table->dropIndex('subusers_server_id_foreign');
$table->dropForeign(['server_id']);
$table->dropIndex(['server_id']);
});
}
}

View file

@ -9,7 +9,7 @@ class AddForeignTasks extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('tasks', function (Blueprint $table) {
$table->foreign('server')->references('id')->on('servers');
@ -19,7 +19,7 @@ class AddForeignTasks extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('tasks', function (Blueprint $table) {
$table->dropForeign(['server']);

View file

@ -7,7 +7,7 @@ class AddArkServiceOptionFixed extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
DB::transaction(function () {
$service = DB::table('services')->select('id')->where('author', 'ptrdctyl-v040-11e6-8b77-86f30ca893d3')->where('name', 'Source Engine')->first();
@ -73,7 +73,7 @@ class AddArkServiceOptionFixed extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
DB::transaction(function () {
$service = DB::table('services')->select('id')->where('author', 'ptrdctyl-v040-11e6-8b77-86f30ca893d3')->where('name', 'Source Engine')->first();

View file

@ -9,7 +9,7 @@ class AddPackSupport extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('service_packs', function (Blueprint $table) {
$table->increments('id');
@ -29,7 +29,7 @@ class AddPackSupport extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::drop('service_packs');
}

View file

@ -9,7 +9,7 @@ class SetServiceNameUnique extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('services', function (Blueprint $table) {
$table->unique('name');
@ -19,7 +19,7 @@ class SetServiceNameUnique extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('services', function (Blueprint $table) {
$table->dropUnique('services_name_unique');

View file

@ -9,7 +9,7 @@ class AddPackColumn extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->unsignedInteger('pack')->nullable()->after('option');
@ -21,7 +21,7 @@ class AddPackColumn extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->dropForeign(['pack']);

View file

@ -9,7 +9,7 @@ class AddConfigurableUploadLimit extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('nodes', function (Blueprint $table) {
$table->unsignedInteger('upload_size')->after('disk_overallocate')->default(100);
@ -19,7 +19,7 @@ class AddConfigurableUploadLimit extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('nodes', function (Blueprint $table) {
$table->dropColumn('upload_size');

View file

@ -7,7 +7,7 @@ class CorrectServiceVariables extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
DB::transaction(function () {
// Modify Default Spigot Startup Line
@ -66,7 +66,7 @@ class CorrectServiceVariables extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
// do nothing
}

View file

@ -7,7 +7,7 @@ class FixMisnamedOptionTag extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
DB::transaction(function () {
DB::table('service_options')->where([
@ -23,7 +23,7 @@ class FixMisnamedOptionTag extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
DB::table('service_options')->where([
['name', 'Sponge (SpongeVanilla)'],

View file

@ -9,7 +9,7 @@ class CreateNodeConfigurationTokensTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::create('node_configuration_tokens', function (Blueprint $table) {
$table->increments('id');
@ -24,7 +24,7 @@ class CreateNodeConfigurationTokensTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::dropIfExists('node_configuration_tokens');
}

View file

@ -10,7 +10,7 @@ class AddMoreUserData extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->string('name_first')->after('email')->nullable();
@ -34,7 +34,7 @@ class AddMoreUserData extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('name_first');

View file

@ -9,22 +9,15 @@ class UpdateColumnNames extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->dropForeign('servers_node_foreign');
$table->dropForeign('servers_owner_foreign');
$table->dropForeign('servers_allocation_foreign');
$table->dropForeign('servers_service_foreign');
$table->dropForeign('servers_option_foreign');
$table->dropForeign('servers_pack_foreign');
$table->dropIndex('servers_node_foreign');
$table->dropIndex('servers_owner_foreign');
$table->dropIndex('servers_allocation_foreign');
$table->dropIndex('servers_service_foreign');
$table->dropIndex('servers_option_foreign');
$table->dropIndex('servers_pack_foreign');
$table->dropForeign(['node']);
$table->dropForeign(['owner']);
$table->dropForeign(['allocation']);
$table->dropForeign(['service']);
$table->dropForeign(['option']);
$table->dropForeign(['pack']);
$table->renameColumn('node', 'node_id');
$table->renameColumn('owner', 'owner_id');
@ -47,14 +40,10 @@ class UpdateColumnNames extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->dropForeign(['node_id']);
$table->dropForeign(['owner_id']);
$table->dropForeign(['allocation_id']);
$table->dropForeign(['service_id']);
$table->dropForeign(['option_id']);
$table->dropForeign(['node_id', 'owner_id', 'allocation_id', 'service_id', 'option_id']);
$table->renameColumn('node_id', 'node');
$table->renameColumn('owner_id', 'owner');

View file

@ -9,11 +9,10 @@ class UpdateNodesTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('nodes', function (Blueprint $table) {
$table->dropForeign('nodes_location_foreign');
$table->dropIndex('nodes_location_foreign');
$table->dropForeign(['location']);
$table->renameColumn('location', 'location_id');
$table->foreign('location_id')->references('id')->on('locations');
@ -23,11 +22,10 @@ class UpdateNodesTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('nodes', function (Blueprint $table) {
$table->dropForeign('nodes_location_id_foreign');
$table->dropIndex('nodes_location_id_foreign');
$table->dropForeign(['location_id']);
$table->renameColumn('location_id', 'location');
$table->foreign('location')->references('id')->on('locations');

View file

@ -9,13 +9,11 @@ class RenameColumns extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('allocations', function (Blueprint $table) {
$table->dropForeign('allocations_node_foreign');
$table->dropForeign('allocations_assigned_to_foreign');
$table->dropIndex('allocations_node_foreign');
$table->dropIndex('allocations_assigned_to_foreign');
$table->dropForeign(['node']);
$table->dropForeign(['assigned_to']);
$table->renameColumn('node', 'node_id');
$table->renameColumn('assigned_to', 'server_id');
@ -27,13 +25,13 @@ class RenameColumns extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('allocations', function (Blueprint $table) {
$table->dropForeign('allocations_node_id_foreign');
$table->dropForeign('allocations_server_id_foreign');
$table->dropIndex('allocations_node_id_foreign');
$table->dropIndex('allocations_server_id_foreign');
$table->dropForeign(['node_id']);
$table->dropForeign(['server_id']);
$table->dropIndex(['node_id']);
$table->dropIndex(['server_id']);
$table->renameColumn('node_id', 'node');
$table->renameColumn('server_id', 'assigned_to');

View file

@ -9,11 +9,10 @@ class AdjustColumnNames extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('service_options', function (Blueprint $table) {
$table->dropForeign('service_options_parent_service_foreign');
$table->dropIndex('service_options_parent_service_foreign');
$table->dropForeign(['parent_service']);
$table->renameColumn('parent_service', 'service_id');
$table->foreign('service_id')->references('id')->on('services');
@ -23,11 +22,11 @@ class AdjustColumnNames extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('service_options', function (Blueprint $table) {
$table->dropForeign('service_options_service_id_foreign');
$table->dropIndex('service_options_service_id_foreign');
$table->dropForeign(['service_id']);
$table->dropIndex(['service_id']);
$table->renameColumn('service_id', 'parent_service');
$table->foreign('parent_service')->references('id')->on('services');

View file

@ -9,11 +9,10 @@ class AdjustColumnNamesForServicePacks extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('service_packs', function (Blueprint $table) {
$table->dropForeign('service_packs_option_foreign');
$table->dropIndex('service_packs_option_foreign');
$table->dropForeign(['option']);
$table->renameColumn('option', 'option_id');
$table->foreign('option_id')->references('id')->on('service_options');
@ -23,11 +22,11 @@ class AdjustColumnNamesForServicePacks extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('service_packs', function (Blueprint $table) {
$table->dropForeign('service_packs_option_id_foreign');
$table->dropIndex('service_packs_option_id_foreign');
$table->dropForeign(['option_id']);
$table->dropIndex(['option_id']);
$table->renameColumn('option_id', 'option');
$table->foreign('option')->references('id')->on('service_options');

View file

@ -11,7 +11,7 @@ class SetupPermissionsPivotTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('permissions', function (Blueprint $table) {
$table->unsignedInteger('subuser_id')->after('id');
@ -19,17 +19,15 @@ class SetupPermissionsPivotTable extends Migration
DB::transaction(function () {
foreach (Subuser::all() as &$subuser) {
Permission::where('user_id', $subuser->user_id)->where('server_id', $subuser->server_id)->update([
Permission::query()->where('user_id', $subuser->user_id)->where('server_id', $subuser->server_id)->update([
'subuser_id' => $subuser->id,
]);
}
});
Schema::table('permissions', function (Blueprint $table) {
$table->dropForeign('permissions_server_id_foreign');
$table->dropIndex('permissions_server_id_foreign');
$table->dropForeign('permissions_user_id_foreign');
$table->dropIndex('permissions_user_id_foreign');
$table->dropForeign(['server_id']);
$table->dropForeign(['user_id']);
$table->dropColumn('server_id');
$table->dropColumn('user_id');
@ -42,7 +40,7 @@ class SetupPermissionsPivotTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('permissions', function (Blueprint $table) {
$table->unsignedInteger('server_id')->after('subuser_id');
@ -52,7 +50,7 @@ class SetupPermissionsPivotTable extends Migration
DB::transaction(function () {
foreach (Subuser::all() as &$subuser) {
Permission::where('subuser_id', $subuser->id)->update([
Permission::query()->where('subuser_id', $subuser->id)->update([
'user_id' => $subuser->user_id,
'server_id' => $subuser->server_id,
]);
@ -60,8 +58,8 @@ class SetupPermissionsPivotTable extends Migration
});
Schema::table('permissions', function (Blueprint $table) {
$table->dropForeign('permissions_subuser_id_foreign');
$table->dropIndex('permissions_subuser_id_foreign');
$table->dropForeign(['subuser_id']);
$table->dropIndex(['subuser_id']);
$table->dropColumn('subuser_id');
$table->foreign('server_id')->references('id')->on('servers');

View file

@ -9,10 +9,10 @@ class UpdateAPIKeyColumnNames extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('api_keys', function (Blueprint $table) {
$table->dropForeign('api_keys_user_foreign')->dropIndex('api_keys_user_foreign');
$table->dropForeign(['user']);
$table->renameColumn('user', 'user_id');
$table->foreign('user_id')->references('id')->on('users');
@ -22,10 +22,10 @@ class UpdateAPIKeyColumnNames extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('api_keys', function (Blueprint $table) {
$table->dropForeign('api_keys_user_id_foreign')->dropIndex('api_keys_user_id_foreign');
$table->dropForeign(['user_id']);
$table->renameColumn('user_id', 'user');
$table->foreign('user')->references('id')->on('users');

View file

@ -9,7 +9,7 @@ class UpdateNodeConfigTokensColumns extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('node_configuration_tokens', function (Blueprint $table) {
$table->dropForeign(['node']);
@ -23,7 +23,7 @@ class UpdateNodeConfigTokensColumns extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('node_configuration_tokens', function (Blueprint $table) {
$table->dropForeign(['node_id']);

View file

@ -9,7 +9,7 @@ class DeleteServiceExecutableOption extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('services', function (Blueprint $table) {
$table->renameColumn('file', 'folder');
@ -22,7 +22,7 @@ class DeleteServiceExecutableOption extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('services', function (Blueprint $table) {
$table->string('executable')->after('folder');

View file

@ -9,7 +9,7 @@ class AddNewServiceOptionsColumns extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('service_options', function (Blueprint $table) {
$table->dropColumn('executable');
@ -27,7 +27,7 @@ class AddNewServiceOptionsColumns extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('service_options', function (Blueprint $table) {
$table->dropForeign(['config_from']);

View file

@ -7,7 +7,7 @@ class MigrateToNewServiceSystem extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
DB::transaction(function () {
$service = DB::table('services')->where('author', config('pterodactyl.service.core'))->where('folder', 'srcds')->first();
@ -32,7 +32,7 @@ class MigrateToNewServiceSystem extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
// Not doing reversals right now...
}

View file

@ -9,7 +9,7 @@ class ChangeServiceVariablesValidationRules extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('service_variables', function (Blueprint $table) {
$table->renameColumn('regex', 'rules');
@ -30,7 +30,7 @@ class ChangeServiceVariablesValidationRules extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('service_variables', function (Blueprint $table) {
$table->renameColumn('rules', 'regex');

View file

@ -85,7 +85,7 @@ EOF;
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('services', function (Blueprint $table) {
$table->text('index_file')->after('startup');
@ -105,7 +105,7 @@ EOF;
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('services', function (Blueprint $table) {
$table->dropColumn('index_file');

View file

@ -9,7 +9,7 @@ class RenameServicePacksToSingluarPacks extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('service_packs', function (Blueprint $table) {
$table->dropForeign(['option_id']);
@ -25,7 +25,7 @@ class RenameServicePacksToSingluarPacks extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('packs', function (Blueprint $table) {
$table->dropForeign(['option_id']);

View file

@ -9,7 +9,7 @@ class AddLockedStatusToTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('packs', function (Blueprint $table) {
$table->boolean('locked')->default(false)->after('visible');
@ -19,7 +19,7 @@ class AddLockedStatusToTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('packs', function (Blueprint $table) {
$table->dropColumn('locked');

View file

@ -9,7 +9,7 @@ class ReOrganizeDatabaseServersToDatabaseHost extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('database_servers', function (Blueprint $table) {
$table->dropForeign(['linked_node']);
@ -27,7 +27,7 @@ class ReOrganizeDatabaseServersToDatabaseHost extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('database_hosts', function (Blueprint $table) {
$table->dropForeign(['node_id']);

View file

@ -9,7 +9,7 @@ class CleanupDatabasesDatabase extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('databases', function (Blueprint $table) {
$table->dropForeign(['db_server']);
@ -23,7 +23,7 @@ class CleanupDatabasesDatabase extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('databases', function (Blueprint $table) {
$table->dropForeign(['database_host_id']);

View file

@ -9,7 +9,7 @@ class AddForeignKeyToPacks extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->foreign('pack_id')->references('id')->on('packs');
@ -19,7 +19,7 @@ class AddForeignKeyToPacks extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->dropForeign(['pack_id']);

View file

@ -9,7 +9,7 @@ class AddServerDescriptionColumn extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->text('description')->after('name');
@ -19,7 +19,7 @@ class AddServerDescriptionColumn extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->dropColumn('description');

View file

@ -9,7 +9,7 @@ class DropDeletedAtColumnFromServers extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->dropColumn('deleted_at');
@ -19,7 +19,7 @@ class DropDeletedAtColumnFromServers extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->timestamp('deleted_at')->nullable();

View file

@ -10,7 +10,7 @@ class UpgradeTaskSystem extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('tasks', function (Blueprint $table) {
$table->dropForeign(['server']);
@ -33,7 +33,7 @@ class UpgradeTaskSystem extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('tasks', function (Blueprint $table) {
// $table->dropForeign(['server_id']);

View file

@ -9,7 +9,7 @@ class AddScriptsToServiceOptions extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('service_options', function (Blueprint $table) {
$table->text('script_install')->after('startup')->nullable();
@ -22,7 +22,7 @@ class AddScriptsToServiceOptions extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('service_options', function (Blueprint $table) {
$table->dropColumn('script_install');

View file

@ -9,7 +9,7 @@ class AddServiceScriptTrackingToServers extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->boolean('skip_scripts')->default(false)->after('description');
@ -19,7 +19,7 @@ class AddServiceScriptTrackingToServers extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->dropColumn('skip_scripts');

View file

@ -9,7 +9,7 @@ class AddCopyScriptFromColumn extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('service_options', function (Blueprint $table) {
$table->unsignedInteger('copy_script_from')->nullable()->after('script_container');
@ -21,7 +21,7 @@ class AddCopyScriptFromColumn extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('service_options', function (Blueprint $table) {
$table->dropForeign(['copy_script_from']);

View file

@ -9,7 +9,7 @@ class AddAbilityToDefineConnectionOverSSLWithDaemonBehindProxy extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('nodes', function (Blueprint $table) {
$table->boolean('behind_proxy')->after('scheme')->default(false);
@ -19,7 +19,7 @@ class AddAbilityToDefineConnectionOverSSLWithDaemonBehindProxy extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('nodes', function (Blueprint $table) {
$table->dropColumn('behind_proxy');

View file

@ -9,7 +9,7 @@ class DeleteDownloadTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::dropIfExists('downloads');
}
@ -17,7 +17,7 @@ class DeleteDownloadTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::create('downloads', function (Blueprint $table) {
$table->increments('id');

View file

@ -9,7 +9,7 @@ class DeleteNodeConfigurationTable extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::dropIfExists('node_configuration_tokens');
}
@ -17,7 +17,7 @@ class DeleteNodeConfigurationTable extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::create('node_configuration_tokens', function (Blueprint $table) {
$table->increments('id');

View file

@ -9,7 +9,7 @@ class AddExternalIdToUsers extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->unsignedInteger('external_id')->after('id')->nullable()->unique();
@ -19,7 +19,7 @@ class AddExternalIdToUsers extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('external_id');

View file

@ -9,7 +9,7 @@ class ChangeForeignKeyToBeOnCascadeDelete extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('api_permissions', function (Blueprint $table) {
$table->dropForeign(['key_id']);
@ -21,7 +21,7 @@ class ChangeForeignKeyToBeOnCascadeDelete extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('api_permissions', function (Blueprint $table) {
$table->dropForeign(['key_id']);

Some files were not shown because too many files have changed in this diff Show more