You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
769 B
PHTML
37 lines
769 B
PHTML
4 years ago
|
<?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
|
||
|
{
|
||
|
$this->schema->create('oauth', function (Blueprint $table) {
|
||
|
$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');
|
||
|
}
|
||
|
}
|