Path: blob/1.0-develop/database/migrations/2016_10_14_164802_update_api_keys.php
7461 views
<?php12use Illuminate\Support\Facades\Schema;3use Illuminate\Database\Schema\Blueprint;4use Illuminate\Database\Migrations\Migration;56class UpdateApiKeys extends Migration7{8/**9* Run the migrations.10*/11public function up(): void12{13Schema::table('api_keys', function (Blueprint $table) {14$table->unsignedInteger('user')->after('id');15$table->text('memo')->after('allowed_ips')->nullable();16$table->timestamp('expires_at')->after('memo')->nullable();17});18}1920/**21* Reverse the migrations.22*/23public function down(): void24{25Schema::table('api_keys', function (Blueprint $table) {26$table->dropColumn('user');27$table->dropColumn('memo');28$table->dropColumn('expires_at');29});30}31}323334