mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-19 22:14:45 +02:00

* update composer.lock * run pint * fix phpstan * update migrations (sqlite `dropForeign`) * fix migrations * Reset these back for now * Alphabetize the rules * run `php artisan filament:upgrade` --------- Co-authored-by: Lance Pioch <git@lance.sh>
39 lines
985 B
PHP
39 lines
985 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
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.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
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');
|
|
});
|
|
}
|
|
};
|