code: protected function prepareInsertValues($table, $columns, $params = [])
      {
          list($names, $placeholders, $values, $params) = parent::prepareInsertValues($table, $columns, $params);
          if (!$columns instanceof Query && empty($names)) {
              $tableSchema = $this->db->getSchema()->getTableSchema($table);
              if ($tableSchema !== null) {
                  $columns = !empty($tableSchema->primaryKey) ? $tableSchema->primaryKey : [reset($tableSchema->columns)->name];
                  foreach ($columns as $name) {
                      $names[] = $this->db->quoteColumnName($name);
                      $placeholders[] = 'DEFAULT';
                  }
              }
          }
          return [$names, $placeholders, $values, $params];
      }
docs: {@inheritdoc}