feat: strava sync

This commit is contained in:
2026-05-20 16:33:57 +02:00
parent a66fc41e1f
commit 67d4f05342
13 changed files with 565 additions and 0 deletions
@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('strava_connections', function (Blueprint $table) {
$table->ulid('id')->primary();
$table->foreignUlid('user_id')->constrained()->cascadeOnDelete();
$table->unsignedBigInteger('athlete_id')->nullable()->unique();
$table->text('access_token');
$table->text('refresh_token');
$table->timestampTz('expires_at')->nullable()->index();
$table->json('scopes')->nullable();
$table->json('athlete')->nullable();
$table->timestampsTz();
$table->unique('user_id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('strava_connections');
}
};