Базовая версия клиента авторизации по протоколу OAuth2
This commit is contained in:
41
database/migrations/2020_02_26_105934_oauth_user.php
Normal file
41
database/migrations/2020_02_26_105934_oauth_user.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
use App\OAuth2User;
|
||||
|
||||
class OauthUser extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create(OAuth2User::TABLE_NAME, function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('email')->unique();
|
||||
$table->string('name');
|
||||
$table->string('patronymic');
|
||||
$table->string('lastname');
|
||||
$table->text('access_token');
|
||||
$table->text('refresh_token');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
$table->timestamp('expires_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists(OAuth2User::TABLE_NAME);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user