snipe-it/database/migrations/2019_12_04_223111_passport_upgrade.php
2020-10-15 19:15:33 -07:00

38 lines
822 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class PassportUpgrade extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if (Schema::hasTable('oauth_clients')) {
Schema::table('oauth_clients', function (Blueprint $table) {
$table->string('secret', 100)->nullable()->change();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
if (Schema::hasTable('oauth_clients')) {
Schema::table('oauth_clients', function(Blueprint $table)
{
$table->dropColumn('secret');
});
}
}
}