<?php
    
    use yii\db\Migration;
    
    class m160905_154051_create_table_feedback extends Migration
    {
        
        public function up()
        {
            $this->createTable('{{%feedback}}', [
                'feedback_id' => $this->primaryKey(),
                'name'        => $this->string(),
                'phone'       => $this->string()
                                      ->notNull(),
                'date_add'    => $this->integer(),
                'ip'          => $this->string(),
            ]);
        }
        
        public function down()
        {
            $this->dropTable('{{%feedback}}');
        }
    }
