mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-22 09:02:28 +01:00
Fix DB migrations to allow rollbacks
This commit is contained in:
parent
3ee5803416
commit
a73e71dd81
@ -23,8 +23,8 @@ class AllowNegativeValuesForOverallocation extends Migration
|
||||
public function down()
|
||||
{
|
||||
Schema::table('nodes', function (Blueprint $table) {
|
||||
$table->mediumInteger('disk_overallocate')->unsigned()->nullable()->change();
|
||||
$table->mediumInteger('memory_overallocate')->unsigned()->nullable()->change();
|
||||
DB::statement('ALTER TABLE nodes MODIFY disk_overallocate MEDIUMINT UNSIGNED NULL,
|
||||
MODIFY memory_overallocate MEDIUMINT UNSIGNED NULL');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,9 @@ class SetAllocationUnqiueUsingMultipleFields extends Migration
|
||||
public function down()
|
||||
{
|
||||
Schema::table('allocations', function (Blueprint $table) {
|
||||
$table->dropForeign(['node_id']);
|
||||
$table->dropUnique(['node_id', 'ip', 'port']);
|
||||
$table->foreign('node_id')->references('id')->on('nodes');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user