<commit_before><?php

use Illuminate\Database\Schema\Blueprint;
use Flarum\Migrations\Migration;
use Flarum\Tags\Tag;

class CreateTagsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        $this->schema->create('tags', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 100);
            $table->string('slug', 100);
            $table->text('description')->nullable();

            $table->string('color', 50)->nullable();
            $table->string('background_path', 100)->nullable();
            $table->string('background_mode', 100)->nullable();

            $table->integer('position')->nullable();
            $table->integer('parent_id')->unsigned()->nullable();
            $table->string('default_sort', 50)->nullable();
            $table->boolean('is_restricted')->default(0);
            $table->boolean('is_hidden')->default(0);

            $table->integer('discussions_count')->unsigned()->default(0);
            $table->integer('last_time')->unsigned()->nullable();
            $table->integer('last_discussion_id')->unsigned()->nullable();
        });

        Tag::unguard();
        Tag::insert([
            'name' => 'General',
            'slug' => 'general',
            'color' => '#888',
            'position' => '0'
        ]);
    }

    /**<commit_msg>Fix last_time type<commit_after><?php

use Illuminate\Database\Schema\Blueprint;
use Flarum\Migrations\Migration;
use Flarum\Tags\Tag;

class CreateTagsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        $this->schema->create('tags', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 100);
            $table->string('slug', 100);
            $table->text('description')->nullable();

            $table->string('color', 50)->nullable();
            $table->string('background_path', 100)->nullable();
            $table->string('background_mode', 100)->nullable();

            $table->integer('position')->nullable();
            $table->integer('parent_id')->unsigned()->nullable();
            $table->string('default_sort', 50)->nullable();
            $table->boolean('is_restricted')->default(0);
            $table->boolean('is_hidden')->default(0);

            $table->integer('discussions_count')->unsigned()->default(0);
            $table->dateTime('last_time')->nullable();
            $table->integer('last_discussion_id')->unsigned()->nullable();
        });

        Tag::unguard();
        Tag::insert([
            'name' => 'General',
            'slug' => 'general',
            'color' => '#888',
            'position' => '0'
        ]);
    }

    /**
{'fraction_non_alphanumeric': 0.1958981612446959, 'fraction_numerical': 0.016265912305516265, 'mean_word_length': 2.297202797202797, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 76, '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': '4886228', 'n_tokens_mistral': 806, 'n_tokens_neox': 775, 'n_words': 110}