#34 remove users from uuid

This commit is contained in:
Nabeel Shahzad 2017-06-24 13:30:13 -05:00
parent 7cde58f6f6
commit fe1100e57f
3 changed files with 4 additions and 7 deletions

View File

@ -31,7 +31,6 @@ use Illuminate\Contracts\Auth\CanResetPassword;
*/
class User extends Authenticatable
{
use Uuids;
use Notifiable;
use EntrustUserTrait;

View File

@ -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

View File

@ -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')