<commit_before><?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddConfirmationToUsersTable extends Migration
{

  /**
   * Run the migrations.
   *
   * @return void
   */
  public function up()
  {
    Schema::table('reg_user',
        function (Blueprint $table) {
          $table->string('confirmation_code');
          $table->string('name', 191);
          $table->boolean('confirmed')->default(config('access.users.confirm_email') ? false : true);
          $table->boolean('status')->default(true);
        });
    //set a random unique confirmation code
    DB::statement('update reg_user set confirmation_code = md5(SYSDATE(6));');
  }


  /**
   * Reverse the migrations.
   *
   * @return void
   */
  public function down()
  {
    Schema::table('reg_user',
        function (Blueprint $table) {
          $table->dropColumn([ 'confirmation_code', 'confirmed', 'name' ]);
        });
  }
}<commit_msg>set name to match nickname in migration<commit_after><?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddConfirmationToUsersTable extends Migration
{

  /**
   * Run the migrations.
   *
   * @return void
   */
  public function up()
  {
    Schema::table('reg_user',
        function (Blueprint $table) {
          $table->string('confirmation_code');
          $table->string('name', 191);
          $table->boolean('confirmed')->default(config('access.users.confirm_email') ? false : true);
          $table->boolean('status')->default(true);
        });
    //set a random unique confirmation code
    DB::statement('update reg_user set confirmation_code = md5(SYSDATE(6));');
    DB::statement('update reg_user set name = nickname;');
  }


  /**
   * Reverse the migrations.
   *
   * @return void
   */
  public function down()
  {
    Schema::table('reg_user',
        function (Blueprint $table) {
          $table->dropColumn([ 'confirmation_code', 'confirmed', 'name', 'status' ]);
        });
  }
}
{'fraction_non_alphanumeric': 0.1507823613086771, 'fraction_numerical': 0.00474158368895211, 'mean_word_length': 3.0891472868217056, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5565202', 'n_tokens_mistral': 630, 'n_tokens_neox': 626, 'n_words': 126}