<commit_before><?php

use Illuminate\Database\Migrations\Migration;

class RenameClientTable extends Migration
{
    /**
     * The raw MongoDB interface.
     * @var MongoDB
     */
    protected $mongodb;

    public function __construct()
    {
        $this->mongodb = app('db')->getMongoDB();
    }

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        // The 'jenssegers/laravel-mongodb' package doesn't support Schema::rename so...
        $this->mongodb->execute('db.api_keys.renameCollection("clients");');
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        $this->mongodb->execute('db.clients.renameCollection("api_keys");');
    }
}
<commit_msg>Update migration to overwrite existing destination table.<commit_after><?php

use Illuminate\Database\Migrations\Migration;

class RenameClientTable extends Migration
{
    /**
     * The raw MongoDB interface.
     * @var MongoDB
     */
    protected $mongodb;

    public function __construct()
    {
        $this->mongodb = app('db')->getMongoDB();
    }

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        // The 'jenssegers/laravel-mongodb' package doesn't support Schema::rename so...
        $this->mongodb->execute('db.api_keys.renameCollection("clients", true);');
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        $this->mongodb->execute('db.clients.renameCollection("api_keys", true);');
    }
}

{'fraction_non_alphanumeric': 0.14118372379778052, 'fraction_numerical': 0.0, 'mean_word_length': 2.285425101214575, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '4821428', 'n_tokens_mistral': 506, 'n_tokens_neox': 496, 'n_words': 98}