<commit_before><?php

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

/**
 * Class ChangesForV380
 */
class ChangesForV380 extends Migration
{
    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('export_jobs');

    }

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        // new table "export_jobs"
        Schema::create(
            'export_jobs', function (Blueprint $table) {
            $table->increments('id');
            $table->timestamps();
            $table->integer('user_id')->unsigned();
            $table->string('key', 12)->unique();
            $table->string('status', 45);

            // connect rule groups to users
            $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');

        }
        );

        // new table for transaction journal meta, "journal_meta"
        Schema::create('journal_meta', function(Blueprint $table) {
            $table->increments('id');
            $table->timestamps();
            $table->integer('transaction_journal_id')->unsigned();
            $table->string('name');
            $table->text('data');

            $table->unique(['transaction_journal_id', 'name']);

            // link to transaction journal
            $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade');
        });<commit_msg>Some code used for #164<commit_after><?php

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

/**
 * Class ChangesForV380
 */
class ChangesForV380 extends Migration
{
    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('export_jobs');
        Schema::drop('journal_meta');
    }

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        // new table "export_jobs"
        Schema::create(
            'export_jobs', function (Blueprint $table) {
            $table->increments('id');
            $table->timestamps();
            $table->integer('user_id')->unsigned();
            $table->string('key', 12)->unique();
            $table->string('status', 45);

            // connect rule groups to users
            $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');

        }
        );

        // new table for transaction journal meta, "journal_meta"
        Schema::create(
            'journal_meta', function (Blueprint $table) {
            $table->increments('id');
            $table->timestamps();
            $table->integer('transaction_journal_id')->unsigned();
            $table->string('name');
            $table->text('data');

            $table->unique(['transaction_journal_id', 'name']);

            // link to transaction journal
            $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade');
        }
        );
{'fraction_non_alphanumeric': 0.16153846153846155, 'fraction_numerical': 0.007371794871794872, 'mean_word_length': 2.165314401622718, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 47, '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': '3136993', 'n_tokens_mistral': 869, 'n_tokens_neox': 833, 'n_words': 149}