@@ -5,32 +5,32 @@ |
||
| 5 | 5 | |
| 6 | 6 | class CreateOauthAccessTokensTable extends Migration { |
| 7 | 7 | |
| 8 | - /** |
|
| 9 | - * Run the migrations. |
|
| 10 | - * |
|
| 11 | - * @return void |
|
| 12 | - */ |
|
| 13 | - public function up() |
|
| 14 | - { |
|
| 15 | - Schema::create('oauth_access_tokens', function(Blueprint $table) |
|
| 16 | - { |
|
| 17 | - $table->increments('id'); |
|
| 18 | - $table->integer('session_id')->unsigned(); |
|
| 19 | - $table->string('token'); |
|
| 20 | - $table->dateTime('expire_time'); |
|
| 8 | + /** |
|
| 9 | + * Run the migrations. |
|
| 10 | + * |
|
| 11 | + * @return void |
|
| 12 | + */ |
|
| 13 | + public function up() |
|
| 14 | + { |
|
| 15 | + Schema::create('oauth_access_tokens', function(Blueprint $table) |
|
| 16 | + { |
|
| 17 | + $table->increments('id'); |
|
| 18 | + $table->integer('session_id')->unsigned(); |
|
| 19 | + $table->string('token'); |
|
| 20 | + $table->dateTime('expire_time'); |
|
| 21 | 21 | |
| 22 | - $table->foreign('session_id')->references('id')->on('oauth_sessions'); |
|
| 23 | - }); |
|
| 24 | - } |
|
| 22 | + $table->foreign('session_id')->references('id')->on('oauth_sessions'); |
|
| 23 | + }); |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * Reverse the migrations. |
|
| 28 | - * |
|
| 29 | - * @return void |
|
| 30 | - */ |
|
| 31 | - public function down() |
|
| 32 | - { |
|
| 33 | - Schema::drop('oauth_access_tokens'); |
|
| 34 | - } |
|
| 26 | + /** |
|
| 27 | + * Reverse the migrations. |
|
| 28 | + * |
|
| 29 | + * @return void |
|
| 30 | + */ |
|
| 31 | + public function down() |
|
| 32 | + { |
|
| 33 | + Schema::drop('oauth_access_tokens'); |
|
| 34 | + } |
|
| 35 | 35 | |
| 36 | 36 | } |
@@ -5,33 +5,33 @@ |
||
| 5 | 5 | |
| 6 | 6 | class CreateOauthSessionsTable extends Migration { |
| 7 | 7 | |
| 8 | - /** |
|
| 9 | - * Run the migrations. |
|
| 10 | - * |
|
| 11 | - * @return void |
|
| 12 | - */ |
|
| 13 | - public function up() |
|
| 14 | - { |
|
| 15 | - Schema::create('oauth_sessions', function(Blueprint $table) |
|
| 16 | - { |
|
| 17 | - $table->increments('id'); |
|
| 18 | - $table->integer('client_id')->unsigned(); |
|
| 19 | - $table->string('owner_type'); |
|
| 20 | - $table->string('owner_id'); |
|
| 21 | - $table->string('client_redirect_uri')->nullable(); |
|
| 8 | + /** |
|
| 9 | + * Run the migrations. |
|
| 10 | + * |
|
| 11 | + * @return void |
|
| 12 | + */ |
|
| 13 | + public function up() |
|
| 14 | + { |
|
| 15 | + Schema::create('oauth_sessions', function(Blueprint $table) |
|
| 16 | + { |
|
| 17 | + $table->increments('id'); |
|
| 18 | + $table->integer('client_id')->unsigned(); |
|
| 19 | + $table->string('owner_type'); |
|
| 20 | + $table->string('owner_id'); |
|
| 21 | + $table->string('client_redirect_uri')->nullable(); |
|
| 22 | 22 | |
| 23 | - $table->foreign('client_id')->references('id')->on('oauth_clients'); |
|
| 24 | - }); |
|
| 25 | - } |
|
| 23 | + $table->foreign('client_id')->references('id')->on('oauth_clients'); |
|
| 24 | + }); |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * Reverse the migrations. |
|
| 29 | - * |
|
| 30 | - * @return void |
|
| 31 | - */ |
|
| 32 | - public function down() |
|
| 33 | - { |
|
| 34 | - Schema::drop('oauth_sessions'); |
|
| 35 | - } |
|
| 27 | + /** |
|
| 28 | + * Reverse the migrations. |
|
| 29 | + * |
|
| 30 | + * @return void |
|
| 31 | + */ |
|
| 32 | + public function down() |
|
| 33 | + { |
|
| 34 | + Schema::drop('oauth_sessions'); |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | 37 | } |
@@ -5,30 +5,30 @@ |
||
| 5 | 5 | |
| 6 | 6 | class CreateOauthClientsTable extends Migration { |
| 7 | 7 | |
| 8 | - /** |
|
| 9 | - * Run the migrations. |
|
| 10 | - * |
|
| 11 | - * @return void |
|
| 12 | - */ |
|
| 13 | - public function up() |
|
| 14 | - { |
|
| 15 | - Schema::create('oauth_clients', function(Blueprint $table) |
|
| 16 | - { |
|
| 17 | - $table->increments('id'); |
|
| 18 | - $table->string('key')->unique(); |
|
| 19 | - $table->string('secret'); |
|
| 20 | - $table->string('name'); |
|
| 21 | - }); |
|
| 22 | - } |
|
| 8 | + /** |
|
| 9 | + * Run the migrations. |
|
| 10 | + * |
|
| 11 | + * @return void |
|
| 12 | + */ |
|
| 13 | + public function up() |
|
| 14 | + { |
|
| 15 | + Schema::create('oauth_clients', function(Blueprint $table) |
|
| 16 | + { |
|
| 17 | + $table->increments('id'); |
|
| 18 | + $table->string('key')->unique(); |
|
| 19 | + $table->string('secret'); |
|
| 20 | + $table->string('name'); |
|
| 21 | + }); |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * Reverse the migrations. |
|
| 26 | - * |
|
| 27 | - * @return void |
|
| 28 | - */ |
|
| 29 | - public function down() |
|
| 30 | - { |
|
| 31 | - Schema::drop('oauth_clients'); |
|
| 32 | - } |
|
| 24 | + /** |
|
| 25 | + * Reverse the migrations. |
|
| 26 | + * |
|
| 27 | + * @return void |
|
| 28 | + */ |
|
| 29 | + public function down() |
|
| 30 | + { |
|
| 31 | + Schema::drop('oauth_clients'); |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | 34 | } |
@@ -5,30 +5,30 @@ |
||
| 5 | 5 | |
| 6 | 6 | class CreateOauthRefreshTokensTable extends Migration { |
| 7 | 7 | |
| 8 | - /** |
|
| 9 | - * Run the migrations. |
|
| 10 | - * |
|
| 11 | - * @return void |
|
| 12 | - */ |
|
| 13 | - public function up() |
|
| 14 | - { |
|
| 15 | - Schema::create('oauth_refresh_tokens', function(Blueprint $table) |
|
| 16 | - { |
|
| 17 | - $table->increments('id'); |
|
| 18 | - $table->integer('access_token_id')->unsigned(); |
|
| 19 | - $table->string('token'); |
|
| 20 | - $table->dateTime('expire_time'); |
|
| 21 | - }); |
|
| 22 | - } |
|
| 8 | + /** |
|
| 9 | + * Run the migrations. |
|
| 10 | + * |
|
| 11 | + * @return void |
|
| 12 | + */ |
|
| 13 | + public function up() |
|
| 14 | + { |
|
| 15 | + Schema::create('oauth_refresh_tokens', function(Blueprint $table) |
|
| 16 | + { |
|
| 17 | + $table->increments('id'); |
|
| 18 | + $table->integer('access_token_id')->unsigned(); |
|
| 19 | + $table->string('token'); |
|
| 20 | + $table->dateTime('expire_time'); |
|
| 21 | + }); |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * Reverse the migrations. |
|
| 26 | - * |
|
| 27 | - * @return void |
|
| 28 | - */ |
|
| 29 | - public function down() |
|
| 30 | - { |
|
| 31 | - Schema::drop('oauth_refresh_tokens'); |
|
| 32 | - } |
|
| 24 | + /** |
|
| 25 | + * Reverse the migrations. |
|
| 26 | + * |
|
| 27 | + * @return void |
|
| 28 | + */ |
|
| 29 | + public function down() |
|
| 30 | + { |
|
| 31 | + Schema::drop('oauth_refresh_tokens'); |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | 34 | } |