<commit_before><?php

use yii\db\Schema;
use yii\db\Migration;
use yii\helpers\Security;
class m141101_015745_createtable_admin_user extends Migration
{
    public function up()
    {
        $tableOptions = null;
        if ($this->db->driverName === 'mysql') {
            $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
        }

        $this->createTable('{{%t_adm_user}}', [
            'id' => Schema::TYPE_PK,
            'username' => Schema::TYPE_STRING . '(64) NOT NULL',
            'password' => Schema::TYPE_STRING . '(64) NOT NULL',
            'userphoto' => Schema::TYPE_STRING . '(64)  NULL',
        ], $tableOptions);
        $pw1 = Security::generatePasswordHash('<PASSWORD>');
        $pw2 = Security::generatePasswordHash('<PASSWORD>');
        $sql = "INSERT INTO `t_adm_user` (`id`, `username`, `password`) VALUES
(1, 'admin', <PASSWORD>'),
(2, 'demo', <PASSWORD>');";
        $this->execute($sql);
    }

    public function down()
    {
        echo "m141101_015745_createtable_admin_user cannot be reverted.\n";

        return false;
    }
}
<commit_msg>update admin_user<commit_after><?php

use yii\db\Schema;
use yii\db\Migration;
use yii\helpers\Security;
class m141101_015745_createtable_admin_user extends Migration
{
    public function up()
    {
        $tableOptions = null;
        if ($this->db->driverName === 'mysql') {
            $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
        }

        $this->createTable('{{%t_adm_user}}', [
            'id' => Schema::TYPE_PK,
            'username' => Schema::TYPE_STRING . '(64) NOT NULL',
            'password' => Schema::TYPE_STRING . '(64) NOT NULL',
            'userphoto' => Schema::TYPE_STRING . '(64)  NULL',
        ], $tableOptions);
        $pw1 = Security::generatePasswordHash('<PASSWORD>');
        $pw2 = Security::generatePasswordHash('<PASSWORD>');
        $sql = "INSERT INTO `t_adm_user` (`id`, `username`, `password`,`userphoto`) VALUES
(1, 'admin', '$pw1','default.jpg'),
(2, 'demo', '$pw2','default.jpg');";
        $this->execute($sql);
    }

    public function down()
    {
        echo "m141101_015745_createtable_admin_user cannot be reverted.\n";

        return false;
    }
}

{'fraction_non_alphanumeric': 0.16430469441984058, 'fraction_numerical': 0.03277236492471213, 'mean_word_length': 2.8948275862068966, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 25, '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': '2402096', 'n_tokens_mistral': 784, 'n_tokens_neox': 728, 'n_words': 149}