コード例 #1
0
 public function down()
 {
     if ($this->isSqlite()) {
         echo '!!! SQLite does not support drop columns.' . PHP_EOL;
         return;
     }
     $this->dropColumn(Config::tableName(), 'perms');
 }
コード例 #2
0
 public function down()
 {
     $this->dropTable(Config::tableName());
     $this->dropTable(Storage::tableName());
 }
コード例 #3
0
ファイル: Param.php プロジェクト: skoro/yii2-admin-template
 /**
  * Returns list of section names.
  * @return array
  */
 public static function getSections()
 {
     $rows = (new Query())->from(Config::tableName())->select('section')->distinct()->all();
     return array_map(function ($row) {
         return $row['section'];
     }, $rows);
 }