From fe1100e57f59b95c9e8f468e32220988a88318ee Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sat, 24 Jun 2017 13:30:13 -0500 Subject: [PATCH] #34 remove users from uuid --- app/Models/User.php | 1 - app/Services/DatabaseService.php | 5 ++--- database/migrations/2017_06_08_0000_create_users_table.php | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index ea8681fa..e91d5286 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -31,7 +31,6 @@ use Illuminate\Contracts\Auth\CanResetPassword; */ class User extends Authenticatable { - use Uuids; use Notifiable; use EntrustUserTrait; diff --git a/app/Services/DatabaseService.php b/app/Services/DatabaseService.php index 92c2234e..f47c345b 100644 --- a/app/Services/DatabaseService.php +++ b/app/Services/DatabaseService.php @@ -11,15 +11,14 @@ use Illuminate\Support\Facades\DB; class DatabaseService extends BaseService { - protected static $time_fields = [ + protected $time_fields = [ 'created_at', 'updated_at' ]; - protected static $uuid_tables = [ + protected $uuid_tables = [ 'flights', 'pireps', - 'users', ]; protected function time(): string diff --git a/database/migrations/2017_06_08_0000_create_users_table.php b/database/migrations/2017_06_08_0000_create_users_table.php index 38a0006f..a6da0e27 100755 --- a/database/migrations/2017_06_08_0000_create_users_table.php +++ b/database/migrations/2017_06_08_0000_create_users_table.php @@ -14,7 +14,7 @@ class CreateUsersTable extends Migration public function up() { Schema::create('users', function (Blueprint $table) { - $table->uuid('id'); + $table->increments('id'); $table->string('name')->nullable(); $table->string('email')->unique(); $table->string('password'); @@ -32,7 +32,6 @@ class CreateUsersTable extends Migration $table->timestamps(); $table->softDeletes(); - $table->primary('id'); }); // Create table for storing roles @@ -46,7 +45,7 @@ class CreateUsersTable extends Migration // Create table for associating roles to users (Many-to-Many) Schema::create('role_user', function (Blueprint $table) { - $table->uuid('user_id'); + $table->integer('user_id')->unsigned(); $table->integer('role_id')->unsigned(); $table->foreign('user_id')->references('id')->on('users')