| @@ 7-35 (lines=29) @@ | ||
| 4 | use Illuminate\Database\Migrations\Migration; |
|
| 5 | use Illuminate\Database\Schema\Blueprint; |
|
| 6 | ||
| 7 | class CreateOauthAuthCodesTable extends Migration |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * Run the migrations. |
|
| 11 | * |
|
| 12 | * @return void |
|
| 13 | */ |
|
| 14 | public function up() |
|
| 15 | { |
|
| 16 | Schema::create('oauth_auth_codes', function (Blueprint $table) { |
|
| 17 | $table->string('id', 100)->primary(); |
|
| 18 | $table->bigInteger('user_id'); |
|
| 19 | $table->unsignedInteger('client_id'); |
|
| 20 | $table->text('scopes')->nullable(); |
|
| 21 | $table->boolean('revoked'); |
|
| 22 | $table->dateTime('expires_at')->nullable(); |
|
| 23 | }); |
|
| 24 | } |
|
| 25 | ||
| 26 | /** |
|
| 27 | * Reverse the migrations. |
|
| 28 | * |
|
| 29 | * @return void |
|
| 30 | */ |
|
| 31 | public function down() |
|
| 32 | { |
|
| 33 | Schema::dropIfExists('oauth_auth_codes'); |
|
| 34 | } |
|
| 35 | } |
|
| 36 | ||
| @@ 7-36 (lines=30) @@ | ||
| 4 | use Illuminate\Database\Migrations\Migration; |
|
| 5 | use Illuminate\Database\Schema\Blueprint; |
|
| 6 | ||
| 7 | class CreateUsersTable extends Migration |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * Run the migrations. |
|
| 11 | * |
|
| 12 | * @return void |
|
| 13 | */ |
|
| 14 | public function up() |
|
| 15 | { |
|
| 16 | Schema::create('users', function (Blueprint $table) { |
|
| 17 | $table->bigIncrements('id'); |
|
| 18 | $table->string('name'); |
|
| 19 | $table->string('email')->unique(); |
|
| 20 | $table->timestamp('email_verified_at')->nullable(); |
|
| 21 | $table->string('password'); |
|
| 22 | $table->rememberToken(); |
|
| 23 | $table->timestamps(); |
|
| 24 | }); |
|
| 25 | } |
|
| 26 | ||
| 27 | /** |
|
| 28 | * Reverse the migrations. |
|
| 29 | * |
|
| 30 | * @return void |
|
| 31 | */ |
|
| 32 | public function down() |
|
| 33 | { |
|
| 34 | Schema::dropIfExists('users'); |
|
| 35 | } |
|
| 36 | } |
|
| 37 | ||