Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/database/migrations/2016_10_14_164802_update_api_keys.php
7461 views
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class UpdateApiKeys extends Migration
8
{
9
/**
10
* Run the migrations.
11
*/
12
public function up(): void
13
{
14
Schema::table('api_keys', function (Blueprint $table) {
15
$table->unsignedInteger('user')->after('id');
16
$table->text('memo')->after('allowed_ips')->nullable();
17
$table->timestamp('expires_at')->after('memo')->nullable();
18
});
19
}
20
21
/**
22
* Reverse the migrations.
23
*/
24
public function down(): void
25
{
26
Schema::table('api_keys', function (Blueprint $table) {
27
$table->dropColumn('user');
28
$table->dropColumn('memo');
29
$table->dropColumn('expires_at');
30
});
31
}
32
}
33
34