<commit_before><?php

use Illuminate\Database\Migrations\Migration;

class UpdateBeatmapsetDatetimesDatatype extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        DB::statement('ALTER TABLE osu_beatmapsets
            MODIFY COLUMN approved_date TIMESTAMP DEFAULT NULL,
            MODIFY COLUMN submit_date TIMESTAMP DEFAULT NULL,
            MODIFY COLUMN thread_icon_date TIMESTAMP DEFAULT NULL,
            MODIFY COLUMN cover_updated_at TIMESTAMP DEFAULT NULL,
            MODIFY COLUMN queued_at TIMESTAMP DEFAULT NULL
        ');
        // some of the times were in UTC+8
        DB::statement('UPDATE osu_beatmapsets SET
            approved_date = IF(approved_date IS NULL, NULL, DATE_SUB(approved_date, INTERVAL 8 HOUR)),
            submit_date = IF(submit_date IS NULL, NULL, DATE_SUB(submit_date, INTERVAL 8 HOUR)),
            thread_icon_date = IF(thread_icon_date IS NULL, NULL, DATE_SUB(thread_icon_date, INTERVAL 8 HOUR))
        ');
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        DB::statement('ALTER TABLE osu_beatmapsets
            MODIFY COLUMN approved_date DATETIME DEFAULT NULL,
            MODIFY COLUMN submit_date DATETIME DEFAULT NULL,
            MODIFY COLUMN thread_icon_date DATETIME DEFAULT NULL,
            MODIFY COLUMN cover_updated_at DATETIME DEFAULT NULL,
            MODIFY COLUMN queued_at DATETIME DEFAULT NULL
        ');
        DB::statement('UPDATE osu_beatmapsets SET
            approved_date = IF(approved_date IS NULL, NULL, DATE_ADD(approved_date, INTERVAL 8 HOUR)),
            submit_date = IF(submit_date IS NULL, NULL, DATE_ADD(submit_date, INTERVAL 8 HOUR)),
            thread_icon_date = IF(thread_icon_date IS NULL, NULL, DATE_ADD(thread_icon_date, INTERVAL 8 HOUR))
        ');
    }
}<commit_msg>No need to check for null<commit_after><?php

use Illuminate\Database\Migrations\Migration;

class UpdateBeatmapsetDatetimesDatatype extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        DB::statement('ALTER TABLE osu_beatmapsets
            MODIFY COLUMN approved_date TIMESTAMP DEFAULT NULL,
            MODIFY COLUMN submit_date TIMESTAMP DEFAULT NULL,
            MODIFY COLUMN thread_icon_date TIMESTAMP DEFAULT NULL,
            MODIFY COLUMN cover_updated_at TIMESTAMP DEFAULT NULL,
            MODIFY COLUMN queued_at TIMESTAMP DEFAULT NULL
        ');
        // some of the times were in UTC+8
        DB::statement('UPDATE osu_beatmapsets SET
            approved_date = DATE_SUB(approved_date, INTERVAL 8 HOUR),
            submit_date = DATE_SUB(submit_date, INTERVAL 8 HOUR),
            thread_icon_date = DATE_SUB(thread_icon_date, INTERVAL 8 HOUR)
        ');
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        DB::statement('ALTER TABLE osu_beatmapsets
            MODIFY COLUMN approved_date DATETIME DEFAULT NULL,
            MODIFY COLUMN submit_date DATETIME DEFAULT NULL,
            MODIFY COLUMN thread_icon_date DATETIME DEFAULT NULL,
            MODIFY COLUMN cover_updated_at DATETIME DEFAULT NULL,
            MODIFY COLUMN queued_at DATETIME DEFAULT NULL
        ');
        DB::statement('UPDATE osu_beatmapsets SET
            approved_date = DATE_ADD(approved_date, INTERVAL 8 HOUR),
            submit_date = DATE_ADD(submit_date, INTERVAL 8 HOUR),
            thread_icon_date = DATE_ADD(thread_icon_date, INTERVAL 8 HOUR)
        ');
    }
}
{'fraction_non_alphanumeric': 0.06494221243808475, 'fraction_numerical': 0.003852504127682994, 'mean_word_length': 2.475143403441683, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '6101505', 'n_tokens_mistral': 1090, 'n_tokens_neox': 1050, 'n_words': 293}