diff --git a/database/migrations/2018_01_01_000001_create_oauth_auth_codes_table.php b/database/migrations/2018_01_01_000001_create_oauth_auth_codes_table.php new file mode 100644 index 0000000000..8060c72695 --- /dev/null +++ b/database/migrations/2018_01_01_000001_create_oauth_auth_codes_table.php @@ -0,0 +1,38 @@ +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'); + } +} diff --git a/database/migrations/2018_01_01_000002_create_oauth_access_tokens_table.php b/database/migrations/2018_01_01_000002_create_oauth_access_tokens_table.php new file mode 100644 index 0000000000..e5096aeb11 --- /dev/null +++ b/database/migrations/2018_01_01_000002_create_oauth_access_tokens_table.php @@ -0,0 +1,40 @@ +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'); + } +} diff --git a/database/migrations/2018_01_01_000003_create_oauth_refresh_tokens_table.php b/database/migrations/2018_01_01_000003_create_oauth_refresh_tokens_table.php new file mode 100644 index 0000000000..c6f714a55a --- /dev/null +++ b/database/migrations/2018_01_01_000003_create_oauth_refresh_tokens_table.php @@ -0,0 +1,36 @@ +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'); + } +} diff --git a/database/migrations/2018_01_01_000004_create_oauth_clients_table.php b/database/migrations/2018_01_01_000004_create_oauth_clients_table.php new file mode 100644 index 0000000000..c09b56c4a3 --- /dev/null +++ b/database/migrations/2018_01_01_000004_create_oauth_clients_table.php @@ -0,0 +1,41 @@ +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'); + } +} diff --git a/database/migrations/2018_01_01_000005_create_oauth_personal_access_clients_table.php b/database/migrations/2018_01_01_000005_create_oauth_personal_access_clients_table.php new file mode 100644 index 0000000000..3feaaeaf1d --- /dev/null +++ b/database/migrations/2018_01_01_000005_create_oauth_personal_access_clients_table.php @@ -0,0 +1,35 @@ +increments('id'); + $table->integer('client_id')->index(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('oauth_personal_access_clients'); + } +}