string('firstname')->change()->comment('First name of the user.'); $table->string('firstname')->change()->comment('Last name of the user.'); $table->timestamp('email_verified_at')->after('email')->nullable(); $table->boolean('role')->after('remember_token') ->comment('Role of the user who defines the rights/access.'); $table->boolean('published')->after('role')->comment('The user is acivated or not.'); $table->timestamp('published_at')->after('published')->nullable()->comment('The date on which the user was acivated.'); }); Schema::table('users', function (Blueprint $table) { $table->renameColumn('firstname', 'first_name'); $table->renameColumn('lastname', 'last_name'); }); DB::table('users')->update(['role' => RoleEnum::admin->value()]); DB::table('users')->update(['published' => true]); DB::table('users')->where('email', 'equipe.web@ldc.fr')->update(['role' => RoleEnum::conceptor->value()]); } /** * Reverse the migrations. * * @return void */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->renameColumn('first_name', 'firstname'); $table->renameColumn('last_name', 'lastname'); $table->dropColumn('email_verified_at'); $table->dropColumn('role'); $table->dropColumn('published'); $table->dropColumn('published_at'); }); } };