<commit_before><?php

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

class CreateRemindersTable extends Migration
{

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('reminders');
    }

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create(
            'reminders', function (Blueprint $table) {
                $table->increments('id');
                $table->timestamps();
                $table->string('class', 40);
                $table->integer('piggybank_id')->unsigned()->nullable();
                $table->integer('recurring_transaction_id')->unsigned()->nullable();
                $table->integer('user_id')->unsigned();
                $table->date('startdate');
                $table->date('enddate');
                $table->boolean('active');


                // connect reminders to piggy banks.
                $table->foreign('piggybank_id')
                    ->references('id')->on('piggybanks')
                    ->onDelete('set null');

                // connect reminders to recurring transactions.
                $table->foreign('recurring_transaction_id')
                    ->references('id')->on('recurring_transactions')
                    ->onDelete('set null');


                // connect reminders to users<commit_msg>Enddate can be NULL.<commit_after><?php

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

class CreateRemindersTable extends Migration
{

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('reminders');
    }

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create(
            'reminders', function (Blueprint $table) {
                $table->increments('id');
                $table->timestamps();
                $table->string('class', 40);
                $table->integer('piggybank_id')->unsigned()->nullable();
                $table->integer('recurring_transaction_id')->unsigned()->nullable();
                $table->integer('user_id')->unsigned();
                $table->date('startdate');
                $table->date('enddate')->nullable();
                $table->boolean('active');


                // connect reminders to piggy banks.
                $table->foreign('piggybank_id')
                    ->references('id')->on('piggybanks')
                    ->onDelete('set null');

                // connect reminders to recurring transactions.
                $table->foreign('recurring_transaction_id')
                    ->references('id')->on('recurring_transactions')
                    ->onDelete('set null');


                // connect reminders to users
{'fraction_non_alphanumeric': 0.14441789006486855, 'fraction_numerical': 0.0013656538067599864, 'mean_word_length': 1.743445692883895, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 48, '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': '1890939', 'n_tokens_mistral': 791, 'n_tokens_neox': 742, 'n_words': 128}