Instead of having hard-coded INDEX_... consts, we can specify a report's columns in Report class metadata, eg,
$this->columns = array('nb_visits', 'nb_actions', 'nb_conversions', ...);
then in the DB, the columns will have indexes determined by the data in Report metadata, eg,
array( 'nb_visits' => 32, // note: no nb_actions 'nb_conversions' => 333 )
will be converted into
array( 0 => 32, 2 => 333
This will allow plugins to specify new metrics w/o having to store the full string for each column in the DB.
Will need to provide backwards compatibility, though.
This may be done / refactored as part of the Archiver refactor: https://github.com/piwik/piwik/issues/7470