Exemplo n.º 1
0
 public function down()
 {
     $this->dropTable(Config::tableName());
 }
Exemplo n.º 2
0
 /**
  * Insert configuration parameter.
  * @param array $param Parameter from $config.
  * @return integer
  */
 protected function insert(array $param)
 {
     foreach (['rules', 'options'] as $binary) {
         if (isset($param[$binary])) {
             $param[$binary] = serialize($param[$binary]);
         }
     }
     return Yii::$app->db->createCommand()->insert(Config::tableName(), $param)->execute();
 }