Skip to content

A free open source IT asset/license management system

Added provider column to oauth_clients table for passport upgrade

snipe74488ddceb4c
diff --git a/database/migrations/2021_02_05_172502_add_provider_to_oauth_table.php b/database/migrations/2021_02_05_172502_add_provider_to_oauth_table.php
new file mode 100644
index 0000000000..7c74d47e3b
--- /dev/null
+++ b/database/migrations/2021_02_05_172502_add_provider_to_oauth_table.php
@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddProviderToOauthTable extends Migration
+{
+ /**
+ * Run the migrations.
+ * Sigh. https://github.com/laravel/passport/blob/master/UPGRADE.md#upgrading-to-90-from-8x
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('oauth_clients', function (Blueprint $table) {
+ $table->string('provider')->after('secret')->nullable();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('oauth_clients', function (Blueprint $table) {
+ $table->dropColumn('provider');
+ });
+
+ }
+}