mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 22:37:28 -08:00
parent
834e0a9dd5
commit
44eb67440a
|
@ -14,9 +14,16 @@ class AddProviderToOauthTable extends Migration
|
||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table('oauth_clients', function (Blueprint $table) {
|
// Add a 'provider' column if not existing or else modify it
|
||||||
$table->string('provider')->after('secret')->nullable();
|
if (!Schema::hasColumn('oauth_clients', 'provider')) {
|
||||||
});
|
Schema::table('oauth_clients', function (Blueprint $table) {
|
||||||
|
$table->string('provider')->after('secret')->nullable();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
Schema::table('oauth_clients', function (Blueprint $table) {
|
||||||
|
$table->string('provider')->after('secret')->nullable()->change();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,9 +33,10 @@ class AddProviderToOauthTable extends Migration
|
||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('oauth_clients', function (Blueprint $table) {
|
if (Schema::hasColumn('oauth_clients', 'provider')) {
|
||||||
$table->dropColumn('provider');
|
Schema::table('oauth_clients', function (Blueprint $table) {
|
||||||
});
|
$table->dropColumn('provider');
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue