<commit_before><?php

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

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

      // if the author is a user, don't redundantly save the information
      $table->integer('author_id')->nullable();
      $table->foreign('author_id')->references('id')->on('users');

      $table->string('author_email');
      $table->string('author_name');

      $table->text('content');

      $table->integer('post_id')->nullable();
      $table->foreign('post_id')->references('id')->on('posts')->onDelete('cascade');
    });
  }

  /**
   * Reverse the migrations.
   *
   * @return void
   */
  public function down()
  {
    Schema::drop('comments');
  }
}<commit_msg>Comments now have a status field.<commit_after><?php

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

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

      // if the author is a user, don't redundantly save the information
      $table->integer('author_id')->nullable();
      $table->foreign('author_id')->references('id')->on('users');

      $table->string('author_email');
      $table->string('author_name');

      $table->text('content');

      $table->enum('status', ['ham', 'spam', 'unvalidated'])->default('unvalidated');

      $table->integer('post_id')->nullable();
      $table->foreign('post_id')->references('id')->on('posts')->onDelete('cascade');
    });
  }

  /**
   * Reverse the migrations.
   *
   * @return void
   */
  public function down()
  {
    Schema::drop('comments');
  }
}
{'fraction_non_alphanumeric': 0.18771842236645034, 'fraction_numerical': 0.0, 'mean_word_length': 3.4140969162995596, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, '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': '5106403', 'n_tokens_mistral': 620, 'n_tokens_neox': 610, 'n_words': 109}