Merge branch 'develop' into update/paper

This commit is contained in:
Dane Everitt 2020-12-24 10:19:19 -08:00 committed by GitHub
commit 158823603a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
88 changed files with 482 additions and 4592 deletions

View file

@ -30,6 +30,8 @@ class FixUniqueIndexToAccountForHost extends Migration
public function down()
{
Schema::table('databases', function (Blueprint $table) {
$table->dropForeign(['database_host_id']);
$table->dropUnique(['database_host_id', 'database']);
$table->dropUnique(['database_host_id', 'username']);

View file

@ -108,7 +108,8 @@ class MergePermissionsTableIntoSubusers extends Migration
foreach (DB::select('SELECT id, permissions FROM subusers') as $datum) {
$values = [];
foreach (json_decode($datum->permissions, true) as $permission) {
if (! empty($v = $flipped[$permission])) {
$v = $flipped[$permission] ?? null;
if (! empty($v)) {
$values[] = $datum->id;
$values[] = $v;
}

View file

@ -0,0 +1,51 @@
<?php
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class SupportMultipleDockerImagesAndUpdates extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('eggs', function (Blueprint $table) {
$table->json('docker_images')->after('docker_image')->nullable();
$table->text('update_url')->after('docker_images')->nullable();
});
Schema::table('eggs', function (Blueprint $table) {
DB::statement('UPDATE `eggs` SET `docker_images` = JSON_ARRAY(docker_image)');
});
Schema::table('eggs', function (Blueprint $table) {
$table->dropColumn('docker_image');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('eggs', function (Blueprint $table) {
$table->text('docker_image')->after('docker_images');
});
Schema::table('eggs', function (Blueprint $table) {
DB::statement('UPDATE `eggs` SET `docker_image` = JSON_UNQUOTE(JSON_EXTRACT(docker_images, "$[0]"))');
});
Schema::table('eggs', function (Blueprint $table) {
$table->dropColumn('docker_images');
$table->dropColumn('update_url');
});
}
}

View file

@ -3,7 +3,7 @@
"meta": {
"version": "PTDL_v1"
},
"exported_at": "2020-11-03T04:22:56+00:00",
"exported_at": "2020-12-06T17:39:27-08: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.",
@ -34,7 +34,7 @@
"rules": "required|regex:\/^([\\w\\d._-]+)(\\.jar)$\/"
},
{
"name": "Forge version",
"name": "Minecraft Version",
"description": "The version of minecraft you want to install for.\r\n\r\nLeaving latest will install the latest recommended version.",
"env_variable": "MC_VERSION",
"default_value": "latest",
@ -58,7 +58,7 @@
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:20"
"rules": "nullable|string|max:20"
}
]
}
}

View file

@ -28,7 +28,7 @@
"name": "Sponge Version",
"description": "The version of SpongeVanilla to download and use.",
"env_variable": "SPONGE_VERSION",
"default_value": "1.11.2-6.1.0-BETA-21",
"default_value": "1.12.2-7.3.0",
"user_viewable": true,
"user_editable": false,
"rules": "required|regex:\/^([a-zA-Z0-9.\\-_]+)$\/"