<commit_before><?php

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

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');

            // @TODO: "->collate('utf8_unicode_ci')" should fix the error:
            // [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
            // MySQL 5.6.26 (current production) have problems, but 5.7.17 (dev box) seems to be ok...
            $table->string('username')->collate('utf8_unicode_ci')->unique();
            $table->string('email')->collate('utf8_unicode_ci')->unique();

            $table->string('password');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}<commit_msg>Bugfix (?) production... "Rollback"<commit_after><?php

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

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');

            // @TODO: "->collate('utf8_unicode_ci')" should fix the error on MySQL 5.6.26:
            // [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
            // MySQL 5.6.26 (current production) have problems, but 5.7.17 (dev box) seems to be ok...
            // Changed the collation to "utf8_unicode_ci" manually at the moment. The better solution needed for sure...
            $table->string('username')->unique();
            $table->string('email')->unique();

            $table->string('password');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}
{'fraction_non_alphanumeric': 0.1391599490878235, 'fraction_numerical': 0.02078913873568095, 'mean_word_length': 2.3399433427762037, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '6202264', 'n_tokens_mistral': 705, 'n_tokens_neox': 676, 'n_words': 172}