<commit_before><?php

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

class FixUidsInArtworkCategory extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        DB::statement("UPDATE `artwork_category`"
            . "SET `category_lake_uid`=CONCAT('PC-', `category_lake_uid`)"
            . "WHERE `category_lake_uid` NOT LIKE 'PC-%'"
        );
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        DB::statement("UPDATE `artwork_category`"
            . " SET `category_lake_uid`=SUBSTR(`category_lake_uid`, 4)"
            . " WHERE `category_lake_uid` LIKE 'PC-%'"
        );
    }
}<commit_msg>Fix migration for unit testing<commit_after><?php

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

class FixUidsInArtworkCategory extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {

        // TODO: SQLite doesn't have CONCAT()
        if (App::environment('testing'))
        {
            return;
        }

        DB::statement("UPDATE `artwork_category`"
            . "SET `category_lake_uid`=CONCAT('PC-', `category_lake_uid`)"
            . "WHERE `category_lake_uid` NOT LIKE 'PC-%'"
        );

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {

        DB::statement("UPDATE `artwork_category`"
            . " SET `category_lake_uid`=SUBSTR(`category_lake_uid`, 4)"
            . " WHERE `category_lake_uid` LIKE 'PC-%'"
        );

    }
}
{'fraction_non_alphanumeric': 0.13067863151991027, 'fraction_numerical': 0.0011217049915872126, 'mean_word_length': 2.191413237924866, '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': '2371355', 'n_tokens_mistral': 569, 'n_tokens_neox': 552, 'n_words': 104}