<commit_before><?php
class Kwc_Abstract_Cards_Update_2 extends Kwf_Update
{
    public function update()
    {
        if (Kwf_Registry::get('db')->fetchAll('SHOW TABLES LIKE "kwc_basic_linktag"')) {
            foreach (Kwf_Registry::get('db')->fetchAll('SELECT component_id, component FROM kwc_basic_linktag') as $row) {
                $sql = "REPLACE INTO kwc_basic_cards SET component_id='{$row['component_id']}', component='{$row['component']}'";
                Kwf_Registry::get('db')->query($sql);
                $sql = "DELETE FROM kwc_basic_linktag WHERE component_id='{$row['component_id']}'";
                Kwf_Registry::get('db')->query($sql);
            }
            Kwf_Registry::get('db')->query('DROP TABLE kwc_basic_linktag');
        }
        foreach (Kwf_Registry::get('db')->fetchAll('SELECT component_id, component FROM kwc_basic_cards') as $row) {
            $config = array(
                'search' => $row['component_id'] . '-link',
                'replace' => $row['component_id'] . '-child',
                'pattern' => $row['component_id'] . '-link%',
            );
            $this->_actions[] = new Kwf_Update_Action_Component_ConvertComponentIds($config);
        }
        parent::preUpdate();
    }
}<commit_msg>fix update: correctly execute actions<commit_after><?php
class Kwc_Abstract_Cards_Update_2 extends Kwf_Update
{
    public function update()
    {
        if (Kwf_Registry::get('db')->fetchAll('SHOW TABLES LIKE "kwc_basic_linktag"')) {
            foreach (Kwf_Registry::get('db')->fetchAll('SELECT component_id, component FROM kwc_basic_linktag') as $row) {
                $sql = "REPLACE INTO kwc_basic_cards SET component_id='{$row['component_id']}', component='{$row['component']}'";
                Kwf_Registry::get('db')->query($sql);
                $sql = "DELETE FROM kwc_basic_linktag WHERE component_id='{$row['component_id']}'";
                Kwf_Registry::get('db')->query($sql);
            }
            Kwf_Registry::get('db')->query('DROP TABLE kwc_basic_linktag');
        }
        foreach (Kwf_Registry::get('db')->fetchAll('SELECT component_id, component FROM kwc_basic_cards') as $row) {
            $config = array(
                'search' => $row['component_id'] . '-link',
                'replace' => $row['component_id'] . '-child',
            );
            $this->_actions[] = new Kwf_Update_Action_Component_ConvertComponentIds($config);
        }
        parent::update();
    }
}
{'fraction_non_alphanumeric': 0.16080808080808082, 'fraction_numerical': 0.0008080808080808081, 'mean_word_length': 2.8447204968944098, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 22, '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': '5913605', 'n_tokens_mistral': 758, 'n_tokens_neox': 727, 'n_words': 125}