<?php
    
    use yii\db\Migration;
    
    /**
     * Class m180402_134101_insert_user_data
     */
    class m180402_134101_insert_user_data extends Migration
    {
        /**
         * {@inheritdoc}
         */
        public function safeUp()
        {
            $this->batchInsert(
                'user',
                [
                    'username',
                    'auth_key',
                    'password_hash',
                    'email',
                    'status',
                    'created_at',
                    'updated_at'
                ],
                [
                    [
                        'admin',
                        'nnVTrUd74i-96Rdu5hnNRd6XN07JA1QS',
                        '$2y$13$j5jHh7eYmQJ39vvO8ds1E.Fu5TXh6bxR8P9cYT5k2tFP33u/aHrXm',
                        'admin@example.com',
                        10,
                        'now()',
                        'now()'
                    ],
                ]
            );
        }
        
        /**
         * {@inheritdoc}
         */
        public function safeDown()
        {
        
        }
        
        /*
        // Use up()/down() to run migration code without a transaction.
        public function up()
        {
    
        }
    
        public function down()
        {
            echo "m180402_134101_insert_user_data cannot be reverted.\n";
    
            return false;
        }
        */
    }
