mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
Cleanup node routes, cleanup remote token
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Pterodactyl\Models\NodeConfigurationToken;
|
||||
|
||||
class UpdateNodeConfigTokensColumns extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('node_configuration_tokens', function (Blueprint $table) {
|
||||
$table->dropForeign(['node']);
|
||||
$table->dropColumn('expires_at');
|
||||
$table->renameColumn('node', 'node_id');
|
||||
|
||||
$table->foreign('node_id')->references('id')->on('nodes');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('node_configuration_tokens', function (Blueprint $table) {
|
||||
$table->dropForeign(['node_id']);
|
||||
$table->renameColumn('node_id', 'node');
|
||||
$table->timestamp('expires_at')->after('token');
|
||||
|
||||
$table->foreign('node')->references('id')->on('nodes');
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user