added new Socialite example to fit in with existing code.

This commit is contained in:
2026-02-21 15:48:48 -06:00
parent 3444174d6e
commit cd247a22b5
7 changed files with 181 additions and 25 deletions

View File

@@ -11,30 +11,61 @@ return new class extends Migration
*/
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
if(!Schema::hasTable('users')) {
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('character_id');
$table->string('character_name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->string('character_owner_hash');
$table->string('token');
$table->string('refresh_token');
$table->integer('expiresIn');
$table->string('user_jwt_token');
$table->rememberToken();
$table->timestamps();
});
}
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
if(!Schema::hasTable('password_reset_tokens')) {
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
}
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('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->string('token');
$table->string('refresh_token');
$table->integer('expiresIn');
$table->string('user_jwt_token');
});
}
if(!Schema::hasTable('esi_scopes')) {
Schema::create('esi_scopes', function (Blueprint $table) {
$table->id();
$table->string('character_id');
$table->string('scope');
});
}
}
/**
@@ -45,5 +76,7 @@ return new class extends Migration
Schema::dropIfExists('users');
Schema::dropIfExists('password_reset_tokens');
Schema::dropIfExists('sessions');
Schema::dropIfExists('esi_token');
Schema::dropIfExists('esi_scopes');
}
};