From c857a3d6e35316d4f725a612e017e6246f8c09b3 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 14 Mar 2026 21:29:22 -0600 Subject: [PATCH] Add migrations --- ...000001_create_oauth_device_codes_table.php | 42 +++++++++++++++++++ .../2026_03_15_032554_fix_passport_keys.php | 33 +++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 database/migrations/2024_06_01_000001_create_oauth_device_codes_table.php create mode 100644 database/migrations/2026_03_15_032554_fix_passport_keys.php diff --git a/database/migrations/2024_06_01_000001_create_oauth_device_codes_table.php b/database/migrations/2024_06_01_000001_create_oauth_device_codes_table.php new file mode 100644 index 000000000..ea078319c --- /dev/null +++ b/database/migrations/2024_06_01_000001_create_oauth_device_codes_table.php @@ -0,0 +1,42 @@ +char('id', 80)->primary(); + $table->foreignId('user_id')->nullable()->index(); + $table->foreignUuid('client_id')->index(); + $table->char('user_code', 8)->unique(); + $table->text('scopes'); + $table->boolean('revoked'); + $table->dateTime('user_approved_at')->nullable(); + $table->dateTime('last_polled_at')->nullable(); + $table->dateTime('expires_at')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('oauth_device_codes'); + } + + /** + * Get the migration connection name. + */ + public function getConnection(): ?string + { + return $this->connection ?? config('passport.connection'); + } +}; diff --git a/database/migrations/2026_03_15_032554_fix_passport_keys.php b/database/migrations/2026_03_15_032554_fix_passport_keys.php new file mode 100644 index 000000000..6a6079d6b --- /dev/null +++ b/database/migrations/2026_03_15_032554_fix_passport_keys.php @@ -0,0 +1,33 @@ +