This repository has been archived by the owner on May 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
175 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
database/migrations/2016_06_01_000001_create_oauth_auth_codes_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class CreateOauthAuthCodesTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('oauth_auth_codes', function (Blueprint $table) { | ||
$table->string('id', 100)->primary(); | ||
$table->integer('user_id'); | ||
$table->integer('client_id'); | ||
$table->text('scopes')->nullable(); | ||
$table->boolean('revoked'); | ||
$table->dateTime('expires_at')->nullable(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::drop('oauth_auth_codes'); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
database/migrations/2016_06_01_000002_create_oauth_access_tokens_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class CreateOauthAccessTokensTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('oauth_access_tokens', function (Blueprint $table) { | ||
$table->string('id', 100)->primary(); | ||
$table->integer('user_id')->index()->nullable(); | ||
$table->integer('client_id'); | ||
$table->string('name')->nullable(); | ||
$table->text('scopes')->nullable(); | ||
$table->boolean('revoked'); | ||
$table->timestamps(); | ||
$table->dateTime('expires_at')->nullable(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::drop('oauth_access_tokens'); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
database/migrations/2016_06_01_000003_create_oauth_refresh_tokens_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class CreateOauthRefreshTokensTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('oauth_refresh_tokens', function (Blueprint $table) { | ||
$table->string('id', 100)->primary(); | ||
$table->string('access_token_id', 100)->index(); | ||
$table->boolean('revoked'); | ||
$table->dateTime('expires_at')->nullable(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::drop('oauth_refresh_tokens'); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
database/migrations/2016_06_01_000004_create_oauth_clients_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class CreateOauthClientsTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('oauth_clients', function (Blueprint $table) { | ||
$table->increments('id'); | ||
$table->integer('user_id')->index()->nullable(); | ||
$table->string('name'); | ||
$table->string('secret', 100); | ||
$table->text('redirect'); | ||
$table->boolean('personal_access_client'); | ||
$table->boolean('password_client'); | ||
$table->boolean('revoked'); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::drop('oauth_clients'); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
database/migrations/2016_06_01_000005_create_oauth_personal_access_clients_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class CreateOauthPersonalAccessClientsTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('oauth_personal_access_clients', function (Blueprint $table) { | ||
$table->increments('id'); | ||
$table->integer('client_id')->index(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::drop('oauth_personal_access_clients'); | ||
} | ||
} |