Remove all references of packs from the Panel
This commit is contained in:
parent
f1978683cc
commit
3c7ffaaadb
60 changed files with 129 additions and 2517 deletions
|
@ -32,7 +32,6 @@ $factory->define(Pterodactyl\Models\Server::class, function (Faker $faker) {
|
|||
'io' => 500,
|
||||
'cpu' => 0,
|
||||
'oom_disabled' => 0,
|
||||
'pack_id' => null,
|
||||
'installed' => 1,
|
||||
'database_limit' => null,
|
||||
'allocation_limit' => null,
|
||||
|
@ -132,18 +131,6 @@ $factory->state(Pterodactyl\Models\EggVariable::class, 'editable', function () {
|
|||
return ['user_editable' => 1];
|
||||
});
|
||||
|
||||
$factory->define(Pterodactyl\Models\Pack::class, function (Faker $faker) {
|
||||
return [
|
||||
'uuid' => $faker->uuid,
|
||||
'name' => $faker->word,
|
||||
'description' => null,
|
||||
'version' => $faker->randomNumber(),
|
||||
'selectable' => 1,
|
||||
'visible' => 1,
|
||||
'locked' => 0,
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(Pterodactyl\Models\Subuser::class, function (Faker $faker) {
|
||||
return [];
|
||||
});
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class DropPacksFromServers extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('servers', function (Blueprint $table) {
|
||||
$table->dropForeign(['pack_id']);
|
||||
$table->dropColumn('pack_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('servers', function (Blueprint $table) {
|
||||
$table->unsignedInteger('pack_id')->after('egg_id')->nullable();
|
||||
$table->foreign('pack_id')->references('id')->on('packs');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class DropPacksFromApiKeyPermissions extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('api_keys', function (Blueprint $table) {
|
||||
$table->dropColumn('r_packs');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('api_keys', function (Blueprint $table) {
|
||||
$table->unsignedTinyInteger('r_packs')->default(0);
|
||||
});
|
||||
}
|
||||
}
|
43
database/migrations/2020_09_13_110047_drop_packs_table.php
Normal file
43
database/migrations/2020_09_13_110047_drop_packs_table.php
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class DropPacksTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::dropIfExists('packs');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::create('packs', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('egg_id');
|
||||
$table->char('uuid', 36)->unique();
|
||||
$table->string('name');
|
||||
$table->string('version');
|
||||
$table->text('description')->nullable();
|
||||
$table->tinyInteger('selectable')->default(1);
|
||||
$table->tinyInteger('visible')->default(1);
|
||||
$table->tinyInteger('locked')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::table('packs', function (Blueprint $table) {
|
||||
$table->foreign('egg_id')->references('id')->on('eggs')->cascadeOnDelete();
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue