2020-11-15 18:47:30 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Engelsystem\Migrations;
|
|
|
|
|
|
|
|
use Engelsystem\Database\Migration\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
|
|
|
|
class CreateOauthTable extends Migration
|
|
|
|
{
|
|
|
|
use Reference;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Run the migration
|
|
|
|
*/
|
|
|
|
public function up(): void
|
|
|
|
{
|
2022-12-14 19:15:20 +01:00
|
|
|
$this->schema->create('oauth', function (Blueprint $table): void {
|
2020-11-15 18:47:30 +01:00
|
|
|
$table->increments('id');
|
|
|
|
$this->referencesUser($table);
|
|
|
|
$table->string('provider');
|
|
|
|
$table->string('identifier');
|
|
|
|
$table->unique(['provider', 'identifier']);
|
|
|
|
$table->timestamps();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migration
|
|
|
|
*/
|
|
|
|
public function down(): void
|
|
|
|
{
|
|
|
|
$this->schema->drop('oauth');
|
|
|
|
}
|
|
|
|
}
|