Skip to content

Commit c54ce99

Browse files
Remove userInteraction from 'config_startup' (pterodactyl#3465)
Removes UserInteraction from existing eggs in the panel, as its no longer supported.
1 parent 2c2c353 commit c54ce99

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\DB;
4+
use Illuminate\Database\Migrations\Migration;
5+
6+
class RemoveUserInteraction extends Migration
7+
{
8+
/**
9+
* Run the migrations.
10+
* @return void
11+
*/
12+
public function up()
13+
{
14+
// Remove User Interaction from startup config
15+
DB::table('eggs')->update([
16+
'config_startup' => DB::raw('JSON_REMOVE(config_startup, \'$.userInteraction\')'),
17+
]);
18+
}
19+
20+
public function down()
21+
{
22+
// Add blank User Interaction array back to startup config
23+
DB::table('eggs')->update([
24+
'config_startup' => DB::raw('JSON_SET(config_startup, \'$.userInteraction\', JSON_ARRAY())'),
25+
]);
26+
}
27+
}

0 commit comments

Comments
 (0)