id(); $table->string('character_owner_hash')->index(); $table->string('character_name'); $table->unsignedBigInteger('character_id')->unique(); $table->text('avatar'); $table->text('token'); $table->text('refresh_token')->nullable(); $table->integer('expiresIn')->nullable(); $table->text('user_jwt')->nullable(); $table->rememberToken(); $table->timestamps(); }); } if(!Schema::hasTable('sessions')) { Schema::create('sessions', function (Blueprint $table) { $table->string('id')->primary(); $table->foreignId('user_id')->nullable()->index(); $table->string('ip_address', 45)->nullable(); $table->text('user_agent')->nullable(); $table->longText('payload'); $table->integer('last_activity')->index(); }); } if(!Schema::hasTable('esi_token')) { Schema::create('esi_token', function (Blueprint $table) { $table->id(); $table->string('character_id'); $table->text('access_token'); $table->text('refresh_token'); $table->string('inserted_at'); $table->integer('expires_in'); }); } if(!Schema::hasTable('esi_scopes')) { Schema::create('esi_scopes', function (Blueprint $table) { $table->id(); $table->string('character_id'); $table->string('scope'); }); } } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('users'); Schema::dropIfExists('password_reset_tokens'); Schema::dropIfExists('sessions'); Schema::dropIfExists('esi_token'); Schema::dropIfExists('esi_scopes'); } };